|
报错信息:2 Q1 w! z/ H F3 o
```bash
& m+ F# s* v+ |5 G& }$ Igyp ERR! find VS* E+ \+ _" A5 ]* ~8 N1 k
gyp ERR! find VS msvs_version not set from command line or npm config
3 T) p1 s+ c4 T+ m2 pgyp ERR! find VS running in VS Command Prompt, installation path is:
" L) g! b# m/ T; L! C. _0 A) g, egyp ERR! find VS "C:\Program Files (x86)\Microsoft Visual Studio\2017"* p: p* d1 r0 R; j" m. ]
gyp ERR! find VS - will only use this version
8 z" f4 P" @+ ~4 k: h# |5 {1 hgyp ERR! find VS could not use PowerShell to find Visual Studio 2017 or newer
' I# c8 Y7 ^- q$ \9 bgyp ERR! find VS looking for Visual Studio 2015
6 v5 ~" X+ S' R6 u/ n& cgyp ERR! find VS - not found! u3 L- p8 H) i2 {
gyp ERR! find VS looking for Visual Studio 2013
& @4 ?1 x1 I7 d, q2 a, y- tgyp ERR! find VS - not found
" v! Y1 s* U3 g! q+ X% T* e, b% rgyp ERR! find VS
0 t1 t: G% v/ Xgyp ERR! find VS **************************************************************9 r j) x( C; A4 C
gyp ERR! find VS You need to install the latest version of Visual Studio3 a* W! r. Z/ Z; ^; Z1 f9 g
gyp ERR! find VS including the "Desktop development with C++" workload.
" x2 n4 b- t& x: v& N" K# Q6 Mgyp ERR! find VS For more information consult the documentation at: @7 @5 M# B" o% J/ \) m8 W, Z
gyp ERR! find VS https://github.com/nodejs/node-gyp#on-windows( i+ j: n9 W* S
gyp ERR! find VS **************************************************************
; k+ m, h' B/ @gyp ERR! find VS% k/ U, w2 }1 D' e5 e4 Y* u
gyp ERR! configure error
! u9 h$ |! l) |% [- T7 N4 ygyp ERR! stack Error: Could not find any Visual Studio installation to use
" J6 J ~7 w* e W* [* d* vgyp ERR! stack at VisualStudioFinder.fail (D:\rymcu\electron-serialport\node_modules\node-gyp\lib\find-visualstu
' ?! k3 P7 H+ L$ Odio.js:121:47)
4 O2 W% y- Z) ~! }. |( j- d4 ygyp ERR! stack at D:\rymcu\electron-serialport\node_modules\node-gyp\lib\find-visualstudio.js:74:16
+ {+ k5 A/ A: dgyp ERR! stack at D:\rymcu\electron-serialport\node_modules\node-gyp\lib\find-visualstudio.js:372:16) H q( U" ]4 W
gyp ERR! stack at D:\rymcu\electron-serialport\node_modules\node-gyp\lib\util.js:54:7
4 ^& w$ \: n* G4 \ J5 Vgyp ERR! stack at D:\rymcu\electron-serialport\node_modules\node-gyp\lib\util.js:33:16
( a6 j% H7 d ] x/ Y, @: S. {gyp ERR! stack at ChildProcess.exithandler (child_process.js:310:5)
5 p% U/ T6 i& `2 w3 m6 _8 w' jgyp ERR! stack at ChildProcess.emit (events.js:315:20)
' w. R# H4 j% t" n7 Vgyp ERR! stack at maybeClose (internal/child_process.js:1021:16)
6 m9 Q5 i0 q5 n/ }3 Rgyp ERR! stack at Process.ChildProcess._handle.onexit (internal/child_process.js:286:5)9 W6 ?( n2 _1 p: l" F, M1 j! ]3 @
gyp ERR! System Windows_NT 10.0.15063 - i) Z v6 n- v. x$ P# V
5 R" C7 L2 D+ y; P7 a
解决办法
9 n0 S' r: K% j, K5 M' l1 j1、卸载nodejs重新安装一遍
& o- l$ Y, a- Z: q/ O
. x! [7 p% \* W7 b2、设置淘宝镜像 npm config set registry https://registry.npm.taobao.org {0 a* g* F2 N# O& I+ @5 A
- C# x% B `. R5 }9 N3、安装nodejs所需的环境(Visual Studio XX、python什么鬼的),执行这个命令会自动检测并帮你安装好,npm install --g --production windows-build-tools
4 F2 L% L" W# w% L————————————————/ F9 B% h( T9 {% G8 C3 \
版权声明:本文为CSDN博主「一点一滴成长」的原创文章,遵循CC 4.0 BY-SA版权协议,转载请附上原文出处链接及本声明。
5 L, b6 `( R% @) _4 M" M5 i; p/ T" b原文链接:https://blog.csdn.net/qq_39946015/article/details/127351920 |
|