|
|
报错信息:' `1 [2 r- L1 m' z2 p1 d: B1 M! U
```bash K8 D+ ?1 B& N3 d5 ~7 R& N+ R
gyp ERR! find VS
5 e5 B, y: r2 J u1 Tgyp ERR! find VS msvs_version not set from command line or npm config
: U) ~$ `6 h i- J: [: Z! \" agyp ERR! find VS running in VS Command Prompt, installation path is:
& |% j$ G, o7 N9 ]$ T' p2 @3 lgyp ERR! find VS "C:\Program Files (x86)\Microsoft Visual Studio\2017"
( \3 i' ^2 u3 ngyp ERR! find VS - will only use this version, _* k. P |- u* h3 U f
gyp ERR! find VS could not use PowerShell to find Visual Studio 2017 or newer
R5 n- V! B5 \, X7 fgyp ERR! find VS looking for Visual Studio 20150 @2 i2 ~5 s- O- q5 Q
gyp ERR! find VS - not found: m+ n: g) h* ]* x2 T
gyp ERR! find VS looking for Visual Studio 2013/ c+ v! q; g; u; ~
gyp ERR! find VS - not found
, r% x# L1 A8 O1 Ogyp ERR! find VS
# i/ g8 {+ r" |" vgyp ERR! find VS **************************************************************- w8 s& R' S" P
gyp ERR! find VS You need to install the latest version of Visual Studio, Q5 T; k& T) s4 X" M$ h: J q
gyp ERR! find VS including the "Desktop development with C++" workload.
! a& B0 r6 d' ?) Dgyp ERR! find VS For more information consult the documentation at:
" E3 G+ R T0 E$ f4 w4 x1 vgyp ERR! find VS https://github.com/nodejs/node-gyp#on-windows
+ Z- [5 H8 v, q$ J/ r' ?gyp ERR! find VS **************************************************************
) w0 k3 l4 i( \% Y4 t! n9 Sgyp ERR! find VS
2 @7 |; Y' X$ n9 b, N* s9 @# Ogyp ERR! configure error+ `$ P$ o* W$ h* q4 e9 W, w! Y
gyp ERR! stack Error: Could not find any Visual Studio installation to use6 Y$ r6 o% z; q. N0 O( a2 x2 D
gyp ERR! stack at VisualStudioFinder.fail (D:\rymcu\electron-serialport\node_modules\node-gyp\lib\find-visualstu
. p9 ^( F6 w: E/ A+ `0 e; C. x$ ]- udio.js:121:47)1 }" s. b/ ]* B c- H: Q V( L
gyp ERR! stack at D:\rymcu\electron-serialport\node_modules\node-gyp\lib\find-visualstudio.js:74:16
1 x* O2 [; g$ `# Igyp ERR! stack at D:\rymcu\electron-serialport\node_modules\node-gyp\lib\find-visualstudio.js:372:16
C+ _2 E4 ^! ~4 c; `7 Mgyp ERR! stack at D:\rymcu\electron-serialport\node_modules\node-gyp\lib\util.js:54:71 j! r1 E( y" N" }; t1 Y+ V
gyp ERR! stack at D:\rymcu\electron-serialport\node_modules\node-gyp\lib\util.js:33:16& k0 P1 M8 d3 D/ }8 f( N- [
gyp ERR! stack at ChildProcess.exithandler (child_process.js:310:5)
* ^: W/ r# p r; T! @5 a+ ngyp ERR! stack at ChildProcess.emit (events.js:315:20)
7 Y" F2 ?5 }# T! \gyp ERR! stack at maybeClose (internal/child_process.js:1021:16)$ k3 u4 M' `+ }! [9 T
gyp ERR! stack at Process.ChildProcess._handle.onexit (internal/child_process.js:286:5), Q, f; \3 S3 D8 r' B
gyp ERR! System Windows_NT 10.0.15063 % S' P: e4 R0 u8 d/ n, S
; F" H/ k2 y' M解决办法
: S7 u3 A/ W' Q, q' s! F8 W! h1、卸载nodejs重新安装一遍6 E* E& _ T& P8 |$ Y
9 V% { \7 w, T+ j: S! p; \% q. `
2、设置淘宝镜像 npm config set registry https://registry.npm.taobao.org
1 u0 V4 ^( p. V# ]! c k: N
& y, l& x+ f7 \0 h% V; e3、安装nodejs所需的环境(Visual Studio XX、python什么鬼的),执行这个命令会自动检测并帮你安装好,npm install --g --production windows-build-tools$ l& V$ f2 t9 e! x. [
————————————————0 A' P4 k/ a. F4 x$ i
版权声明:本文为CSDN博主「一点一滴成长」的原创文章,遵循CC 4.0 BY-SA版权协议,转载请附上原文出处链接及本声明。- S t! D. x$ H* s- M
原文链接:https://blog.csdn.net/qq_39946015/article/details/127351920 |
|