|
|
报错信息:, e: s X% ]- V! r! q
```bash# G" L# h; q" ^9 w; X
gyp ERR! find VS6 z( ]' v% L* e, c0 V* ?( i `0 I
gyp ERR! find VS msvs_version not set from command line or npm config
2 f* e, b# ^9 x1 H. \+ u( m( lgyp ERR! find VS running in VS Command Prompt, installation path is:
3 c' ~+ e+ g) [1 B. D- xgyp ERR! find VS "C:\Program Files (x86)\Microsoft Visual Studio\2017"
- E, z* W; z" o1 n, A+ P7 Hgyp ERR! find VS - will only use this version( x3 e: Z% n2 `% i+ ~2 h: T
gyp ERR! find VS could not use PowerShell to find Visual Studio 2017 or newer8 S, w2 G, Q7 v. |8 R9 ]
gyp ERR! find VS looking for Visual Studio 20158 W- H6 J4 D# ~! ?5 A
gyp ERR! find VS - not found& z* U! Z9 v3 l5 Z
gyp ERR! find VS looking for Visual Studio 20131 s7 [- C" O2 @* b+ _2 }8 G
gyp ERR! find VS - not found- b" M7 J; j+ V
gyp ERR! find VS
/ @9 L9 \1 t3 ^% i% y, ugyp ERR! find VS **************************************************************
' s7 F3 }9 K7 z; e/ U; Cgyp ERR! find VS You need to install the latest version of Visual Studio# r$ }: |# v! t* s7 ~+ k" h+ z
gyp ERR! find VS including the "Desktop development with C++" workload.
: x4 ~3 N: @3 N8 F. U6 k4 xgyp ERR! find VS For more information consult the documentation at:
8 ?) E: p/ p1 ]% l! U9 \) `gyp ERR! find VS https://github.com/nodejs/node-gyp#on-windows
2 h- t8 t' m0 A. I3 m( C ygyp ERR! find VS **************************************************************9 T" S: e8 z( }
gyp ERR! find VS2 a+ W6 K5 i5 ~' q2 E$ ~( T2 l0 Q4 |
gyp ERR! configure error& L6 [ B/ N/ x4 D
gyp ERR! stack Error: Could not find any Visual Studio installation to use( p, b: |0 x t" f" Z! d& k% f- ?; l
gyp ERR! stack at VisualStudioFinder.fail (D:\rymcu\electron-serialport\node_modules\node-gyp\lib\find-visualstu( j& x1 J. w6 m/ n! o6 v1 [. p: E
dio.js:121:47)+ I/ ^8 P" |! _, a+ P; s
gyp ERR! stack at D:\rymcu\electron-serialport\node_modules\node-gyp\lib\find-visualstudio.js:74:16% l2 L* W( g7 ] ~% t
gyp ERR! stack at D:\rymcu\electron-serialport\node_modules\node-gyp\lib\find-visualstudio.js:372:16
( i% I1 [8 i5 Z% a% ]& R% |gyp ERR! stack at D:\rymcu\electron-serialport\node_modules\node-gyp\lib\util.js:54:79 q5 n2 L3 B! f0 {) ~- A( P/ P( r2 W
gyp ERR! stack at D:\rymcu\electron-serialport\node_modules\node-gyp\lib\util.js:33:161 J, o& L% [& f ], e) M0 I$ e% j' z0 x
gyp ERR! stack at ChildProcess.exithandler (child_process.js:310:5)# [2 @" \" ~. o$ o
gyp ERR! stack at ChildProcess.emit (events.js:315:20)+ e9 U' V9 j: }
gyp ERR! stack at maybeClose (internal/child_process.js:1021:16)
- s' {1 c( i, q: o" ]gyp ERR! stack at Process.ChildProcess._handle.onexit (internal/child_process.js:286:5)8 Z: O, R0 b' g7 U% G! s% I
gyp ERR! System Windows_NT 10.0.15063 , Y5 s* ~8 q( r9 f
# ?- }: E/ x! T解决办法5 g/ E. V6 ^" ?$ q0 S
1、卸载nodejs重新安装一遍3 J8 P6 _/ h: t6 u" n
$ J) |- F# N1 |5 q0 n% l2、设置淘宝镜像 npm config set registry https://registry.npm.taobao.org
. e$ j2 k# J b. |
; E2 L$ X8 C6 V1 `6 Y7 s; C3、安装nodejs所需的环境(Visual Studio XX、python什么鬼的),执行这个命令会自动检测并帮你安装好,npm install --g --production windows-build-tools& j9 c9 U7 _$ H; L' Y
————————————————' v1 r2 ], i" \, E$ [- }2 l+ }! n$ }
版权声明:本文为CSDN博主「一点一滴成长」的原创文章,遵循CC 4.0 BY-SA版权协议,转载请附上原文出处链接及本声明。: x# i4 \) \# o9 z* X3 \; `
原文链接:https://blog.csdn.net/qq_39946015/article/details/127351920 |
|