|
|
报错信息:
. ]7 x; t* [" B W```bash6 N% Y. Z3 _5 S8 G
gyp ERR! find VS
5 {/ P" C1 e! Ogyp ERR! find VS msvs_version not set from command line or npm config
; d, ` N d ]gyp ERR! find VS running in VS Command Prompt, installation path is:
" [2 o0 s5 H" g. z) D; m6 Hgyp ERR! find VS "C:\Program Files (x86)\Microsoft Visual Studio\2017"
$ _, B. M4 \- D9 z+ _% B. ngyp ERR! find VS - will only use this version/ d0 f! A' N. A# g E) ~
gyp ERR! find VS could not use PowerShell to find Visual Studio 2017 or newer
- i* d) [8 c9 _% Ngyp ERR! find VS looking for Visual Studio 2015% n$ g( [( i; n8 h$ B' i
gyp ERR! find VS - not found: L3 H1 \' F; |, z( r$ u
gyp ERR! find VS looking for Visual Studio 2013
. j& u" O+ F( x1 \* S, ?$ mgyp ERR! find VS - not found
: W2 E% J$ `$ H5 ~4 tgyp ERR! find VS
) K" `, P% b, [/ K6 G& f- f) w& d- bgyp ERR! find VS **************************************************************
Z- J- T) c9 Wgyp ERR! find VS You need to install the latest version of Visual Studio
/ y2 p0 V1 _5 g3 ^ q" Ggyp ERR! find VS including the "Desktop development with C++" workload.
+ S5 F, W* o( agyp ERR! find VS For more information consult the documentation at:
9 h. d. {) y; N/ K4 Q" i9 Lgyp ERR! find VS https://github.com/nodejs/node-gyp#on-windows) K$ Q& f2 Z8 ^1 J$ b$ E
gyp ERR! find VS **************************************************************
% H8 _1 s/ h* C8 G# i) K7 F1 Ggyp ERR! find VS% f, m3 c4 q1 }6 y
gyp ERR! configure error
/ R; A8 n/ s! b+ s7 X% C( w! Rgyp ERR! stack Error: Could not find any Visual Studio installation to use. y& h" ]- Y7 r" r" _5 q& V
gyp ERR! stack at VisualStudioFinder.fail (D:\rymcu\electron-serialport\node_modules\node-gyp\lib\find-visualstu
. m) c# p$ z: Vdio.js:121:47): q% ~9 D( K# l( V% c% j5 z! [
gyp ERR! stack at D:\rymcu\electron-serialport\node_modules\node-gyp\lib\find-visualstudio.js:74:166 i% i+ F/ V& J/ q
gyp ERR! stack at D:\rymcu\electron-serialport\node_modules\node-gyp\lib\find-visualstudio.js:372:163 k8 Y: C, t8 \7 w/ Y9 J& D- k1 Q
gyp ERR! stack at D:\rymcu\electron-serialport\node_modules\node-gyp\lib\util.js:54:7# \# w; X# ?# g6 r3 S, A
gyp ERR! stack at D:\rymcu\electron-serialport\node_modules\node-gyp\lib\util.js:33:16; W$ I: Y# ~# ]
gyp ERR! stack at ChildProcess.exithandler (child_process.js:310:5)
+ M- c! {8 I/ \: j* K: Q' Xgyp ERR! stack at ChildProcess.emit (events.js:315:20)
8 [& `" h& s4 {gyp ERR! stack at maybeClose (internal/child_process.js:1021:16)
F% U4 e9 ^0 F' ~) p( O, Rgyp ERR! stack at Process.ChildProcess._handle.onexit (internal/child_process.js:286:5)
. u! V. N7 v6 d0 }9 i4 T- o* xgyp ERR! System Windows_NT 10.0.15063 3 s4 I5 Y: r! k
) H* t, N6 e3 A( C0 `. G8 T: n解决办法% N. X& Y: O% n6 [
1、卸载nodejs重新安装一遍: a. k8 q% r& b$ e( r/ r& B
( L$ Z& \$ `7 J( ~3 w6 P6 Z
2、设置淘宝镜像 npm config set registry https://registry.npm.taobao.org" V1 X( e T, B5 x# u3 K
0 j2 g" z z8 q9 H. b
3、安装nodejs所需的环境(Visual Studio XX、python什么鬼的),执行这个命令会自动检测并帮你安装好,npm install --g --production windows-build-tools8 _3 b5 U0 V- h# ^% E2 u
————————————————
2 C$ s( M) a5 P0 Y. n' m版权声明:本文为CSDN博主「一点一滴成长」的原创文章,遵循CC 4.0 BY-SA版权协议,转载请附上原文出处链接及本声明。8 A6 x8 X. n( e+ z) {& s. D
原文链接:https://blog.csdn.net/qq_39946015/article/details/127351920 |
|