|
|
报错信息:$ @' v' K3 m1 {/ i
```bash
, o( t& Z1 \7 ~8 a+ G: ~gyp ERR! find VS" k% \5 B, [3 h9 y+ L2 M1 h/ ]
gyp ERR! find VS msvs_version not set from command line or npm config
) x% d+ ]! y# `2 F Jgyp ERR! find VS running in VS Command Prompt, installation path is:
; X. H9 G" `3 |3 S: n1 dgyp ERR! find VS "C:\Program Files (x86)\Microsoft Visual Studio\2017"
* u4 {, K7 u0 Z5 V9 L1 H o- c3 B* H) Tgyp ERR! find VS - will only use this version
5 M( ?) g# o- i- x1 K$ L+ agyp ERR! find VS could not use PowerShell to find Visual Studio 2017 or newer
' v% k9 d0 H& e! ]/ q0 x6 j' R- Ugyp ERR! find VS looking for Visual Studio 20152 X( d9 R" Y- R' _# t
gyp ERR! find VS - not found
* P# d; ^, C5 Ugyp ERR! find VS looking for Visual Studio 2013
% k& m/ R+ D# j+ z0 F- z; Z; Igyp ERR! find VS - not found
0 X3 V- C0 X* w2 n/ ngyp ERR! find VS
: F* H5 C/ f- {gyp ERR! find VS ************************************************************** u: B: \ x4 M% u
gyp ERR! find VS You need to install the latest version of Visual Studio
0 x0 l% d( q2 h- f$ f+ _1 O ygyp ERR! find VS including the "Desktop development with C++" workload.( h9 l y, q/ W+ h6 l
gyp ERR! find VS For more information consult the documentation at:: Y, d! I% A$ G: b! v1 Z
gyp ERR! find VS https://github.com/nodejs/node-gyp#on-windows
: V! W4 J$ ] t* _% y# _. h& Sgyp ERR! find VS **************************************************************
/ O, W' D+ t, [% I0 }9 o* Ngyp ERR! find VS$ J. M: g( W1 M1 z' b
gyp ERR! configure error# R) ?/ G5 `& m8 I
gyp ERR! stack Error: Could not find any Visual Studio installation to use8 ]' B% s( r! S, \, \
gyp ERR! stack at VisualStudioFinder.fail (D:\rymcu\electron-serialport\node_modules\node-gyp\lib\find-visualstu
7 a* q ?( l2 }1 z- [5 m6 Sdio.js:121:47)3 O9 u; g, I5 j! ~# P
gyp ERR! stack at D:\rymcu\electron-serialport\node_modules\node-gyp\lib\find-visualstudio.js:74:16
0 _$ W7 H" d* U; `, v; xgyp ERR! stack at D:\rymcu\electron-serialport\node_modules\node-gyp\lib\find-visualstudio.js:372:169 J. v3 ~8 A# t9 Q
gyp ERR! stack at D:\rymcu\electron-serialport\node_modules\node-gyp\lib\util.js:54:7$ r1 i3 S( Y( k u7 H1 ~( Z- z
gyp ERR! stack at D:\rymcu\electron-serialport\node_modules\node-gyp\lib\util.js:33:16/ c) z5 R$ v! H+ Q" N
gyp ERR! stack at ChildProcess.exithandler (child_process.js:310:5)
4 y" W6 `, I7 I5 ~8 ^# a( Q% A/ dgyp ERR! stack at ChildProcess.emit (events.js:315:20)
1 y7 s; f8 [- xgyp ERR! stack at maybeClose (internal/child_process.js:1021:16)
+ z3 _* c" a( Q3 agyp ERR! stack at Process.ChildProcess._handle.onexit (internal/child_process.js:286:5); J; M/ `1 @% n. T* k% u
gyp ERR! System Windows_NT 10.0.15063 ; O9 S6 I* e ~ G7 o" W
. Q8 U+ O t Z% M解决办法' |& M- f4 T k9 _$ V4 I
1、卸载nodejs重新安装一遍( ?6 C& W" O- A! l. a: G9 U+ Z
' L7 \; J) K* d2、设置淘宝镜像 npm config set registry https://registry.npm.taobao.org8 w3 S2 I# g7 s- ]6 P
2 P/ Q: K2 }9 P. X3、安装nodejs所需的环境(Visual Studio XX、python什么鬼的),执行这个命令会自动检测并帮你安装好,npm install --g --production windows-build-tools
+ q; {. G! `" R) p————————————————% B; Z8 _- E# Z) W) |
版权声明:本文为CSDN博主「一点一滴成长」的原创文章,遵循CC 4.0 BY-SA版权协议,转载请附上原文出处链接及本声明。
6 A' g- _3 L" |) |' @- U3 x' Y& k原文链接:https://blog.csdn.net/qq_39946015/article/details/127351920 |
|