|
报错信息:& P4 y; R" Z+ v% x9 y
```bash4 ~( V+ }7 P7 \+ Q
gyp ERR! find VS
. K6 @9 T c$ g' W" X* zgyp ERR! find VS msvs_version not set from command line or npm config
3 Z5 b4 w1 X+ r/ Hgyp ERR! find VS running in VS Command Prompt, installation path is:
0 E& j% W" v% k+ Ngyp ERR! find VS "C:\Program Files (x86)\Microsoft Visual Studio\2017"
$ M9 t9 |% A& g1 |3 Y! S$ B. pgyp ERR! find VS - will only use this version
# Q5 l( u7 A! H, U# d& |gyp ERR! find VS could not use PowerShell to find Visual Studio 2017 or newer+ N4 X) g. R- Z+ X# N7 L. F7 Y
gyp ERR! find VS looking for Visual Studio 2015
$ s0 A( {( ~+ `5 I6 p9 [4 r F& L& rgyp ERR! find VS - not found
0 Z4 P7 b' y& p |gyp ERR! find VS looking for Visual Studio 2013
1 b4 G& O. u4 v, Z2 ^+ `6 Vgyp ERR! find VS - not found
7 @' y# {+ J0 l; x S) [gyp ERR! find VS; ]9 ~0 l2 r. b7 `
gyp ERR! find VS **************************************************************) x2 m! z9 l7 A `% F
gyp ERR! find VS You need to install the latest version of Visual Studio+ C* u1 o) U9 T N( F1 q
gyp ERR! find VS including the "Desktop development with C++" workload.9 J) l) S- Y8 B: a% h1 `
gyp ERR! find VS For more information consult the documentation at:) r* ?( q$ f. l4 [8 _/ L# ^
gyp ERR! find VS https://github.com/nodejs/node-gyp#on-windows- Y$ o; R) T; i( s7 q6 }
gyp ERR! find VS **************************************************************
" l. I8 w: b0 m/ |, w I6 X4 `gyp ERR! find VS
2 L$ W8 `! T+ m$ U" x! `5 |5 igyp ERR! configure error6 R, U7 |" U Y P9 u, l* W5 r
gyp ERR! stack Error: Could not find any Visual Studio installation to use5 u, @# d: P* G
gyp ERR! stack at VisualStudioFinder.fail (D:\rymcu\electron-serialport\node_modules\node-gyp\lib\find-visualstu8 w, J% V- s {+ G% f/ b7 C
dio.js:121:47)! w: M, p1 E* A' b7 B
gyp ERR! stack at D:\rymcu\electron-serialport\node_modules\node-gyp\lib\find-visualstudio.js:74:16
; t( u% z8 U( y$ ?gyp ERR! stack at D:\rymcu\electron-serialport\node_modules\node-gyp\lib\find-visualstudio.js:372:16+ x4 i" M! u. M! d3 Y/ I! ~: y8 d5 o' V
gyp ERR! stack at D:\rymcu\electron-serialport\node_modules\node-gyp\lib\util.js:54:7
8 E( a! z, r6 N. e: M! ugyp ERR! stack at D:\rymcu\electron-serialport\node_modules\node-gyp\lib\util.js:33:16: _1 j. z$ f0 S4 X( \$ d
gyp ERR! stack at ChildProcess.exithandler (child_process.js:310:5)
6 s( K% D' \. }# K. y) hgyp ERR! stack at ChildProcess.emit (events.js:315:20)
# t8 t3 m- a/ Q9 C4 S) Egyp ERR! stack at maybeClose (internal/child_process.js:1021:16); w" d l! e4 S2 j0 |) W( G
gyp ERR! stack at Process.ChildProcess._handle.onexit (internal/child_process.js:286:5)* m6 b. N5 F- R% U' g. Q
gyp ERR! System Windows_NT 10.0.15063
9 S6 Q/ d! R- h7 g1 q R
; A, `' f9 b3 `4 K D解决办法
& U' Q& i4 m$ e: l$ @1、卸载nodejs重新安装一遍3 `+ f9 h, R& I, J
3 p9 r. ]& o1 [5 Y6 V( a
2、设置淘宝镜像 npm config set registry https://registry.npm.taobao.org9 s- y6 e2 p$ e! r, r* ]& W
3 q. Y1 u9 ^7 x! t, t1 \1 p3、安装nodejs所需的环境(Visual Studio XX、python什么鬼的),执行这个命令会自动检测并帮你安装好,npm install --g --production windows-build-tools
# x, y- U, y; \! L; i e————————————————
5 \+ e/ j9 `, {! n& H版权声明:本文为CSDN博主「一点一滴成长」的原创文章,遵循CC 4.0 BY-SA版权协议,转载请附上原文出处链接及本声明。
0 q; j, z- E5 ?原文链接:https://blog.csdn.net/qq_39946015/article/details/127351920 |
|