|
|
报错信息:
9 t! ` `8 ]9 v: d, J& o```bash! j! v+ i- v* Z$ b6 J0 [4 i
gyp ERR! find VS
& z) f# ` R" Q+ {gyp ERR! find VS msvs_version not set from command line or npm config6 {4 ^5 L9 M( u% }9 b* n! n
gyp ERR! find VS running in VS Command Prompt, installation path is:
5 k4 o& n6 x$ W9 Hgyp ERR! find VS "C:\Program Files (x86)\Microsoft Visual Studio\2017"' T' ?3 k' u- N0 |' P6 z
gyp ERR! find VS - will only use this version0 @' b5 D+ Q2 E2 x" m4 s% v4 T3 O: N
gyp ERR! find VS could not use PowerShell to find Visual Studio 2017 or newer9 h5 w" f8 k& p: g m |
gyp ERR! find VS looking for Visual Studio 20155 n( I0 m! `& ]: `+ N
gyp ERR! find VS - not found5 U( l3 t3 O7 S% ?, Z, T
gyp ERR! find VS looking for Visual Studio 2013, v6 N$ u7 k W4 j5 t
gyp ERR! find VS - not found
5 b3 D3 {+ v0 Wgyp ERR! find VS
1 c, E# q, d6 e8 R5 I! \/ Ngyp ERR! find VS **************************************************************
0 }. x# F* _! Q! O2 ]/ }( Ugyp ERR! find VS You need to install the latest version of Visual Studio. [# ]( D( p% u% |3 o
gyp ERR! find VS including the "Desktop development with C++" workload.
$ M8 ]9 K3 q' t b4 x" _: t. Vgyp ERR! find VS For more information consult the documentation at:2 \6 r7 G: ] @/ D
gyp ERR! find VS https://github.com/nodejs/node-gyp#on-windows4 ^; y, B+ D) {% Z
gyp ERR! find VS **************************************************************! Z$ O0 m5 D' n2 ~1 ~. O
gyp ERR! find VS9 h" K0 j. l( ?+ \7 B; D
gyp ERR! configure error4 S5 B; Q' V& l
gyp ERR! stack Error: Could not find any Visual Studio installation to use
5 d4 H/ @0 l7 n( o' V) |9 a* q8 Xgyp ERR! stack at VisualStudioFinder.fail (D:\rymcu\electron-serialport\node_modules\node-gyp\lib\find-visualstu
$ N$ \0 x& S3 ddio.js:121:47)2 p: h% t- p+ {5 q
gyp ERR! stack at D:\rymcu\electron-serialport\node_modules\node-gyp\lib\find-visualstudio.js:74:164 L7 p' T/ ^* x4 n
gyp ERR! stack at D:\rymcu\electron-serialport\node_modules\node-gyp\lib\find-visualstudio.js:372:162 \+ j7 |' i+ r9 [; ?# ]5 L
gyp ERR! stack at D:\rymcu\electron-serialport\node_modules\node-gyp\lib\util.js:54:7
1 D1 P/ a4 ?; y2 F! Egyp ERR! stack at D:\rymcu\electron-serialport\node_modules\node-gyp\lib\util.js:33:16, L* A6 a2 x# F9 I
gyp ERR! stack at ChildProcess.exithandler (child_process.js:310:5)
6 l# v& [. d/ o5 |7 }gyp ERR! stack at ChildProcess.emit (events.js:315:20)
" l; ^* F* d! e3 Egyp ERR! stack at maybeClose (internal/child_process.js:1021:16)
6 n y9 G/ }6 I. B5 Sgyp ERR! stack at Process.ChildProcess._handle.onexit (internal/child_process.js:286:5)
2 l& u1 ]6 t' tgyp ERR! System Windows_NT 10.0.15063 $ {* }. b# L; P. z: S
4 s1 l. h ?1 A$ f解决办法
4 s0 l8 f4 a3 D8 W% g1、卸载nodejs重新安装一遍- g0 n4 E- R; `
" P7 a% F0 z2 \7 x3 Q6 [2、设置淘宝镜像 npm config set registry https://registry.npm.taobao.org5 ~( Z0 \8 w% \6 M1 R4 i- r
' Y: I" x5 p2 |/ l& J3、安装nodejs所需的环境(Visual Studio XX、python什么鬼的),执行这个命令会自动检测并帮你安装好,npm install --g --production windows-build-tools
' I% i) Z) f3 a) N" I+ g/ D! \————————————————
: s, z+ ]* U: t7 S$ _版权声明:本文为CSDN博主「一点一滴成长」的原创文章,遵循CC 4.0 BY-SA版权协议,转载请附上原文出处链接及本声明。
% ^! D; D. L! L- R原文链接:https://blog.csdn.net/qq_39946015/article/details/127351920 |
|