|
|
报错信息:* _8 j; O, n; j) r* f( P
```bash; b6 }8 O5 X ^/ v+ X
gyp ERR! find VS) E1 ?& d& ~% O) T+ o: ^0 t
gyp ERR! find VS msvs_version not set from command line or npm config+ S6 c" f- N- m1 y$ e: W
gyp ERR! find VS running in VS Command Prompt, installation path is:; X- X* ^( e) ?4 L( M- M
gyp ERR! find VS "C:\Program Files (x86)\Microsoft Visual Studio\2017"3 K( o( n( z1 ^2 m# z
gyp ERR! find VS - will only use this version) q: {) i; ]8 x
gyp ERR! find VS could not use PowerShell to find Visual Studio 2017 or newer( Q$ O: u' v$ [; J( a) W
gyp ERR! find VS looking for Visual Studio 2015
7 D$ l+ T7 [. Ngyp ERR! find VS - not found- {: g( t: U* q
gyp ERR! find VS looking for Visual Studio 2013
8 b, {8 ^3 `- T- y9 ]6 Ugyp ERR! find VS - not found+ j* H* W1 y. a9 [. u' e
gyp ERR! find VS" Z, J+ j5 K! e0 q) D
gyp ERR! find VS **************************************************************
$ C1 L1 e. J) }8 e1 {& P) Ggyp ERR! find VS You need to install the latest version of Visual Studio
3 \6 X1 L, \4 } \* ^; Xgyp ERR! find VS including the "Desktop development with C++" workload.
) r0 f% |& H0 |, F% Sgyp ERR! find VS For more information consult the documentation at: a! G0 F7 B" K- g; F
gyp ERR! find VS https://github.com/nodejs/node-gyp#on-windows$ @6 \& n0 @ ?' ]. m* j6 A
gyp ERR! find VS **************************************************************; i2 h4 }" |8 v
gyp ERR! find VS7 t; j! J b8 F5 q6 X' ]1 i
gyp ERR! configure error6 ~ i8 u9 |( `* Y
gyp ERR! stack Error: Could not find any Visual Studio installation to use
% i0 f$ V2 B% j2 [( ~) `5 H }3 rgyp ERR! stack at VisualStudioFinder.fail (D:\rymcu\electron-serialport\node_modules\node-gyp\lib\find-visualstu7 b% d; y' T6 ], C6 A: f+ @
dio.js:121:47)" F# \2 _% M* ^& O3 E5 `; R; ]1 O
gyp ERR! stack at D:\rymcu\electron-serialport\node_modules\node-gyp\lib\find-visualstudio.js:74:16
6 X J' H$ @4 I) R( Q+ N: F. Rgyp ERR! stack at D:\rymcu\electron-serialport\node_modules\node-gyp\lib\find-visualstudio.js:372:16
/ Q9 `. K7 G2 p& {! e* I8 E5 Dgyp ERR! stack at D:\rymcu\electron-serialport\node_modules\node-gyp\lib\util.js:54:7. c* S: F( [9 j; L& Z1 }: x
gyp ERR! stack at D:\rymcu\electron-serialport\node_modules\node-gyp\lib\util.js:33:16
9 o+ d4 J' E2 z4 u* u" ogyp ERR! stack at ChildProcess.exithandler (child_process.js:310:5)5 n8 `* V5 c4 H1 F
gyp ERR! stack at ChildProcess.emit (events.js:315:20)
2 J) h' w! L; Hgyp ERR! stack at maybeClose (internal/child_process.js:1021:16)9 u6 ^" p* S$ ~$ M5 B$ Y4 s
gyp ERR! stack at Process.ChildProcess._handle.onexit (internal/child_process.js:286:5)& Z1 L r( F6 {) r+ c& m
gyp ERR! System Windows_NT 10.0.15063 : Q, S! J; p8 ?, C# ~: N
- L4 t" v: L. H
解决办法
, r6 O# u! ?5 U. [% a+ B1、卸载nodejs重新安装一遍( T9 |; t2 U8 b2 s: p
$ ?- a; u& U d9 E: u. B2、设置淘宝镜像 npm config set registry https://registry.npm.taobao.org6 }1 a7 N# s8 m# b% i
8 O8 R v. ~8 I& ?+ i. q3、安装nodejs所需的环境(Visual Studio XX、python什么鬼的),执行这个命令会自动检测并帮你安装好,npm install --g --production windows-build-tools% `8 u5 T! W* }6 R& z& T. D9 F2 u
————————————————
+ ~2 r5 U! q; M6 ~版权声明:本文为CSDN博主「一点一滴成长」的原创文章,遵循CC 4.0 BY-SA版权协议,转载请附上原文出处链接及本声明。
6 G; x# ~% `! c原文链接:https://blog.csdn.net/qq_39946015/article/details/127351920 |
|