|
|
报错信息:# b5 v! r& y) W$ g+ H4 z
```bash
; }2 V$ `, U; E! D& ^. J4 tgyp ERR! find VS- l& `. @2 _$ }5 t2 p! F: P0 M
gyp ERR! find VS msvs_version not set from command line or npm config
/ k+ F( Z1 A$ y! ~1 G8 n; x: igyp ERR! find VS running in VS Command Prompt, installation path is:7 Q) l3 E* J4 O7 ]5 v Q2 h
gyp ERR! find VS "C:\Program Files (x86)\Microsoft Visual Studio\2017"
6 K5 \0 {1 I1 n) }% a+ m" C" tgyp ERR! find VS - will only use this version) a1 Q7 |7 _1 \9 t/ S z, I4 q0 l
gyp ERR! find VS could not use PowerShell to find Visual Studio 2017 or newer+ B) g5 b4 z( R1 q
gyp ERR! find VS looking for Visual Studio 2015' P2 G7 ?& g N2 y; }' V
gyp ERR! find VS - not found9 D9 e, j! ?: h7 U4 |$ F. T6 B
gyp ERR! find VS looking for Visual Studio 2013) |- }% |/ {2 \9 j F
gyp ERR! find VS - not found
& W- a# r* }1 Cgyp ERR! find VS
2 f' t. F" o6 X' K& a- Bgyp ERR! find VS **************************************************************, A: r0 ~. [1 ?; V9 D$ ?
gyp ERR! find VS You need to install the latest version of Visual Studio6 c- w$ q; d- D6 c3 u8 l* i( q2 e! W
gyp ERR! find VS including the "Desktop development with C++" workload.& s4 e7 i! Y5 n
gyp ERR! find VS For more information consult the documentation at:
; p } M. d7 Z$ kgyp ERR! find VS https://github.com/nodejs/node-gyp#on-windows% |* s# f5 Q9 a0 U. y8 G1 s
gyp ERR! find VS **************************************************************; |( h1 r5 z8 v9 c
gyp ERR! find VS8 P" p8 S- q8 q0 A
gyp ERR! configure error
" }$ v, E" J5 n9 E; X* bgyp ERR! stack Error: Could not find any Visual Studio installation to use
: i, E7 r- t9 O* F K+ B! kgyp ERR! stack at VisualStudioFinder.fail (D:\rymcu\electron-serialport\node_modules\node-gyp\lib\find-visualstu9 Q# o( O+ Q3 R0 t ]! ?3 s
dio.js:121:47); {, \- z/ n5 J
gyp ERR! stack at D:\rymcu\electron-serialport\node_modules\node-gyp\lib\find-visualstudio.js:74:161 L4 t7 m+ a( Y9 r& U
gyp ERR! stack at D:\rymcu\electron-serialport\node_modules\node-gyp\lib\find-visualstudio.js:372:16
) _4 K( h4 h1 A2 hgyp ERR! stack at D:\rymcu\electron-serialport\node_modules\node-gyp\lib\util.js:54:7 Q* [- {! P, c8 }
gyp ERR! stack at D:\rymcu\electron-serialport\node_modules\node-gyp\lib\util.js:33:161 B$ A! D( ~' C9 v4 I- ^+ }0 U
gyp ERR! stack at ChildProcess.exithandler (child_process.js:310:5)3 X7 \* d. L" T- m* d. G1 @
gyp ERR! stack at ChildProcess.emit (events.js:315:20)
6 `# M+ h9 W$ l; x! agyp ERR! stack at maybeClose (internal/child_process.js:1021:16)6 y5 ~; E$ x1 d
gyp ERR! stack at Process.ChildProcess._handle.onexit (internal/child_process.js:286:5)* F1 {: m1 x) Q
gyp ERR! System Windows_NT 10.0.15063
$ J3 ]4 L6 m, i0 ?! `+ u9 C% _2 K" _8 A: l
解决办法
9 R6 @. P: h0 z! Q/ O1、卸载nodejs重新安装一遍3 j' d$ O5 z0 n- z) F6 _5 W
4 ~- W" @& L) F" i) T2、设置淘宝镜像 npm config set registry https://registry.npm.taobao.org
" }# E. P6 @% g0 x+ n
% G$ q. @3 Q) P" a9 ]3 }3、安装nodejs所需的环境(Visual Studio XX、python什么鬼的),执行这个命令会自动检测并帮你安装好,npm install --g --production windows-build-tools. W8 ^3 ~* N, d) }) ~: d
————————————————( _* E ]1 T# a! Y4 s4 U
版权声明:本文为CSDN博主「一点一滴成长」的原创文章,遵循CC 4.0 BY-SA版权协议,转载请附上原文出处链接及本声明。; }; T3 S" g; b
原文链接:https://blog.csdn.net/qq_39946015/article/details/127351920 |
|