|
|
报错信息:. v0 D# f! B4 l" R: v$ |& V
```bash: }$ w& G, F- H3 R1 Y0 T d7 V
gyp ERR! find VS
% h, k+ m+ k+ _8 l% Xgyp ERR! find VS msvs_version not set from command line or npm config
5 j# i, x, M3 _+ n0 M( P$ mgyp ERR! find VS running in VS Command Prompt, installation path is:
1 c; h8 c( v" V3 g( m2 dgyp ERR! find VS "C:\Program Files (x86)\Microsoft Visual Studio\2017"
# ~6 r# x9 Q$ p# w4 n, k/ ogyp ERR! find VS - will only use this version
G; h2 @" \) e% ygyp ERR! find VS could not use PowerShell to find Visual Studio 2017 or newer- T1 u$ X6 w$ ?' f9 p- O
gyp ERR! find VS looking for Visual Studio 2015
: w' p9 N8 q. h- m7 x. Agyp ERR! find VS - not found/ w3 ?: C; k5 e# R9 W# R/ J6 f
gyp ERR! find VS looking for Visual Studio 2013 @1 n- y, @* u/ s$ L5 `" C
gyp ERR! find VS - not found
# E4 M3 w( a ~/ s! G7 igyp ERR! find VS6 f- l/ ?3 ~6 t6 x* M
gyp ERR! find VS **************************************************************
: N# x1 W7 a/ u; y8 Rgyp ERR! find VS You need to install the latest version of Visual Studio+ k! K/ t1 r1 _5 P( m b$ M* U
gyp ERR! find VS including the "Desktop development with C++" workload.; d' K7 G; r' @
gyp ERR! find VS For more information consult the documentation at:
- q) `) b1 X" T4 Igyp ERR! find VS https://github.com/nodejs/node-gyp#on-windows+ ~; y; h- t- N' P" R6 c! L! t
gyp ERR! find VS **************************************************************/ n8 P2 O2 p; n4 ~' ?+ x
gyp ERR! find VS! _" b/ N, Y( d) B4 H
gyp ERR! configure error1 Z8 J3 Z- O& }9 H* e7 K. }
gyp ERR! stack Error: Could not find any Visual Studio installation to use+ j' b7 |! i5 F' ], Y/ E# T* T
gyp ERR! stack at VisualStudioFinder.fail (D:\rymcu\electron-serialport\node_modules\node-gyp\lib\find-visualstu- k8 E; V. a* w
dio.js:121:47)
# b: Z! A/ G& G+ |. ]- e) Fgyp ERR! stack at D:\rymcu\electron-serialport\node_modules\node-gyp\lib\find-visualstudio.js:74:16: e. k G" l- d1 `$ J; C
gyp ERR! stack at D:\rymcu\electron-serialport\node_modules\node-gyp\lib\find-visualstudio.js:372:16
9 E" O6 `/ k# D. vgyp ERR! stack at D:\rymcu\electron-serialport\node_modules\node-gyp\lib\util.js:54:7, C" q* W0 M" p' z
gyp ERR! stack at D:\rymcu\electron-serialport\node_modules\node-gyp\lib\util.js:33:16" D+ V" ^5 k, y1 N/ |, N8 a: N
gyp ERR! stack at ChildProcess.exithandler (child_process.js:310:5)
6 ]- L8 s! |$ Tgyp ERR! stack at ChildProcess.emit (events.js:315:20)9 `- ^7 |" W! W3 g: Q) [, P
gyp ERR! stack at maybeClose (internal/child_process.js:1021:16)4 F) t% w. b) l6 c6 ?: U
gyp ERR! stack at Process.ChildProcess._handle.onexit (internal/child_process.js:286:5)3 \6 o% I& G9 N! n8 u
gyp ERR! System Windows_NT 10.0.15063 3 B' w5 H* z( c, t
* |7 r8 m/ e. M" m" X解决办法4 i: Y. e5 i3 H/ [7 X. i
1、卸载nodejs重新安装一遍7 I4 {1 e$ x# l
4 n0 ^1 |, Y! Q( }. {2、设置淘宝镜像 npm config set registry https://registry.npm.taobao.org
2 n$ V4 \$ v5 X6 b' |% T0 J2 e& V |0 h
3、安装nodejs所需的环境(Visual Studio XX、python什么鬼的),执行这个命令会自动检测并帮你安装好,npm install --g --production windows-build-tools2 H! R% }2 E. \% y
————————————————$ z- c0 o; T+ f3 r
版权声明:本文为CSDN博主「一点一滴成长」的原创文章,遵循CC 4.0 BY-SA版权协议,转载请附上原文出处链接及本声明。; d( j! K) c, {5 W( M
原文链接:https://blog.csdn.net/qq_39946015/article/details/127351920 |
|