|
|
报错信息:7 m, S7 s- d- u) d x
```bash5 H+ l$ B# z5 J
gyp ERR! find VS3 O$ Y' q$ z* C$ K" ]
gyp ERR! find VS msvs_version not set from command line or npm config. q7 Q3 R& y* I& o% |0 |) V
gyp ERR! find VS running in VS Command Prompt, installation path is: w9 h& y k$ o& F9 t
gyp ERR! find VS "C:\Program Files (x86)\Microsoft Visual Studio\2017"/ j1 @1 c* e; v+ u2 \5 X
gyp ERR! find VS - will only use this version
# v. ]# G( ~; H$ d8 dgyp ERR! find VS could not use PowerShell to find Visual Studio 2017 or newer" G+ W9 y' }' f% d6 i
gyp ERR! find VS looking for Visual Studio 2015
+ ?9 C. {, I9 v4 egyp ERR! find VS - not found* ~% [; Y7 @. N$ q! ^
gyp ERR! find VS looking for Visual Studio 2013) q! Q4 g% S% {5 m1 \4 i4 L
gyp ERR! find VS - not found: x- R' x) X0 y; O
gyp ERR! find VS/ G3 _7 R U) ?" K1 f* r( j% s
gyp ERR! find VS **************************************************************
3 D9 S0 U1 h' e3 L1 ^gyp ERR! find VS You need to install the latest version of Visual Studio
% E) W5 U0 p" }6 B& Cgyp ERR! find VS including the "Desktop development with C++" workload.
: }* \8 A: f: s! Ggyp ERR! find VS For more information consult the documentation at:
5 L0 f0 h0 S; n* M+ wgyp ERR! find VS https://github.com/nodejs/node-gyp#on-windows
% v8 Z3 h( o. v; [1 y# jgyp ERR! find VS **************************************************************
: k9 Y+ `& Q/ a0 u5 r* m+ ]; w, F5 Q- Ogyp ERR! find VS) e! Y( O# F% B; i& J
gyp ERR! configure error
. h" B4 ?1 I" O! t! kgyp ERR! stack Error: Could not find any Visual Studio installation to use
\' `- K) G2 a u0 n+ {gyp ERR! stack at VisualStudioFinder.fail (D:\rymcu\electron-serialport\node_modules\node-gyp\lib\find-visualstu
% _' I) ?* D4 E' r, }* x8 `6 Y* L: ^: V. ddio.js:121:47)
4 S* f. `7 Q0 xgyp ERR! stack at D:\rymcu\electron-serialport\node_modules\node-gyp\lib\find-visualstudio.js:74:16& d n" Y& N) Q: X# B
gyp ERR! stack at D:\rymcu\electron-serialport\node_modules\node-gyp\lib\find-visualstudio.js:372:16( e( L& B1 ?7 C7 e1 ~' a
gyp ERR! stack at D:\rymcu\electron-serialport\node_modules\node-gyp\lib\util.js:54:7( [, s: o8 U! J6 U; r5 \. x9 m
gyp ERR! stack at D:\rymcu\electron-serialport\node_modules\node-gyp\lib\util.js:33:16
/ o1 [$ k8 M" I( pgyp ERR! stack at ChildProcess.exithandler (child_process.js:310:5)
* Q7 m7 G- R9 d" |- i2 j$ x: fgyp ERR! stack at ChildProcess.emit (events.js:315:20)
" z9 E& k# } E' ^- W: ^gyp ERR! stack at maybeClose (internal/child_process.js:1021:16)/ ]6 q+ E k' z3 n% n
gyp ERR! stack at Process.ChildProcess._handle.onexit (internal/child_process.js:286:5)
+ c, v4 i7 r9 n+ z p8 Tgyp ERR! System Windows_NT 10.0.15063
: Q- g, h# e+ S1 x) i7 d6 ?6 S# w3 L/ G& r- C' S
解决办法- ^, ?% h8 P" Q' Y1 l- \/ C
1、卸载nodejs重新安装一遍' l$ D6 g0 {6 b B& a! I
9 Z5 u. F8 c3 N3 y9 }# f2、设置淘宝镜像 npm config set registry https://registry.npm.taobao.org$ y, \2 Z7 i( X+ b
7 }' }* H7 e# ~4 l& x% @1 n: s
3、安装nodejs所需的环境(Visual Studio XX、python什么鬼的),执行这个命令会自动检测并帮你安装好,npm install --g --production windows-build-tools2 X! Q; Z3 W4 J& @
————————————————% p' z6 d, B9 a: a9 l
版权声明:本文为CSDN博主「一点一滴成长」的原创文章,遵循CC 4.0 BY-SA版权协议,转载请附上原文出处链接及本声明。
+ Z3 j" s, `* J% g0 E5 Q原文链接:https://blog.csdn.net/qq_39946015/article/details/127351920 |
|