|
|
报错信息:/ r$ |' Y2 ~. |0 ^
```bash
4 @4 @% m- `5 Ygyp ERR! find VS
8 i5 S4 f; a! \+ g) X; Q6 q; h/ sgyp ERR! find VS msvs_version not set from command line or npm config7 m, n4 g, u6 a+ ~' p
gyp ERR! find VS running in VS Command Prompt, installation path is:
/ P5 l; G u: K j, _gyp ERR! find VS "C:\Program Files (x86)\Microsoft Visual Studio\2017"
# X. } C" }8 u. ?& ~% d% x' v/ n4 lgyp ERR! find VS - will only use this version$ `, W1 x w( \( O' z6 j: S( s
gyp ERR! find VS could not use PowerShell to find Visual Studio 2017 or newer _8 j. @/ u# f8 R4 v" h; w1 m3 z! S
gyp ERR! find VS looking for Visual Studio 2015
9 x: U5 h/ @1 a" b3 dgyp ERR! find VS - not found
. H6 W, q8 d; R& b' ?: wgyp ERR! find VS looking for Visual Studio 20133 q+ Q- I5 \4 O# m" U
gyp ERR! find VS - not found0 _, M3 z" x: k8 t' e# h
gyp ERR! find VS
& b- p- k& r$ ~( x$ R9 R+ o+ Agyp ERR! find VS **************************************************************3 E7 d( b: G1 y* c( o
gyp ERR! find VS You need to install the latest version of Visual Studio
) j7 T# v5 W; S# y' {- Ngyp ERR! find VS including the "Desktop development with C++" workload.
: Q, J- p1 W( M; z& t8 K& J$ tgyp ERR! find VS For more information consult the documentation at:+ _: V- `% r) j( m( Z' R
gyp ERR! find VS https://github.com/nodejs/node-gyp#on-windows
% j- ? `# o6 Q( g, L* y1 lgyp ERR! find VS **************************************************************/ u; V8 G) I4 Y! |# e* B6 D
gyp ERR! find VS2 ]- ?8 W, c E2 u& k4 h' P# |( d
gyp ERR! configure error. [$ c, |. k8 Z' o0 D
gyp ERR! stack Error: Could not find any Visual Studio installation to use
4 \" W5 P* G* N1 J Q8 rgyp ERR! stack at VisualStudioFinder.fail (D:\rymcu\electron-serialport\node_modules\node-gyp\lib\find-visualstu7 \* w* m/ w. | E0 G2 D+ g* v
dio.js:121:47)
& g4 N! C# w% C7 C2 [# U( {. v3 }$ {# \gyp ERR! stack at D:\rymcu\electron-serialport\node_modules\node-gyp\lib\find-visualstudio.js:74:16
3 K @/ M( P- F) qgyp ERR! stack at D:\rymcu\electron-serialport\node_modules\node-gyp\lib\find-visualstudio.js:372:16
0 L0 I; r) n4 _+ M- |gyp ERR! stack at D:\rymcu\electron-serialport\node_modules\node-gyp\lib\util.js:54:79 t8 }3 E8 _& ` s+ A6 d8 H
gyp ERR! stack at D:\rymcu\electron-serialport\node_modules\node-gyp\lib\util.js:33:16
, L* N' L! s# H4 b9 bgyp ERR! stack at ChildProcess.exithandler (child_process.js:310:5)
! f/ B$ B3 Y* Pgyp ERR! stack at ChildProcess.emit (events.js:315:20)( W4 z j% S, A! o, s" c
gyp ERR! stack at maybeClose (internal/child_process.js:1021:16)
* W+ ]1 [! u. U) x V9 Pgyp ERR! stack at Process.ChildProcess._handle.onexit (internal/child_process.js:286:5)8 w9 @" m/ I0 Q" p. t# y
gyp ERR! System Windows_NT 10.0.15063
1 ~! ~- e: z, T2 ^1 z& ^9 k
! o: ^7 J A& o8 Y6 F" I解决办法) [( Z# x. G) V( }
1、卸载nodejs重新安装一遍* b3 d- a/ j7 A% I9 R7 C. m) l
) A8 e; i0 B# z2 ~; V& C4 l+ \2、设置淘宝镜像 npm config set registry https://registry.npm.taobao.org
7 J# o& ^( G% z; M. D p+ B, V" T6 \- n5 J6 [) Z2 N! O0 C5 F
3、安装nodejs所需的环境(Visual Studio XX、python什么鬼的),执行这个命令会自动检测并帮你安装好,npm install --g --production windows-build-tools
m+ @3 N( O9 ?) C# P- @————————————————
& s5 a& q' X0 L. p8 @: P! w版权声明:本文为CSDN博主「一点一滴成长」的原创文章,遵循CC 4.0 BY-SA版权协议,转载请附上原文出处链接及本声明。
& h/ a, E' Y. c1 f原文链接:https://blog.csdn.net/qq_39946015/article/details/127351920 |
|