|
|
报错信息:9 U) k7 X6 Q( K
```bash
- b9 @* K, O( ^+ b) k0 c2 F; m1 mgyp ERR! find VS
+ s( u/ i5 ~/ Q$ P( `/ q0 i/ fgyp ERR! find VS msvs_version not set from command line or npm config! H; ? H1 v% `/ N) |
gyp ERR! find VS running in VS Command Prompt, installation path is:( u: d! F. x" _
gyp ERR! find VS "C:\Program Files (x86)\Microsoft Visual Studio\2017". Q) ]% u) Y. U- h& @
gyp ERR! find VS - will only use this version
' p' S1 X( Q; L! r, o! ygyp ERR! find VS could not use PowerShell to find Visual Studio 2017 or newer
* y+ E9 g+ ^% k: U: E! B4 Y$ vgyp ERR! find VS looking for Visual Studio 2015
# Z8 c. l5 {# S Jgyp ERR! find VS - not found5 j* M/ |, z, z/ L+ B& i3 f
gyp ERR! find VS looking for Visual Studio 2013
6 w+ c8 C; m, j- B% m, Hgyp ERR! find VS - not found1 H& Z' q* q L* t
gyp ERR! find VS7 {6 u y4 \8 \2 G a9 G
gyp ERR! find VS **************************************************************
3 X- e+ e. h' N& E' I) zgyp ERR! find VS You need to install the latest version of Visual Studio
: J* r# k& g/ xgyp ERR! find VS including the "Desktop development with C++" workload.& u' C8 U) d0 U- _
gyp ERR! find VS For more information consult the documentation at:
9 D0 m/ \+ P" c. P, K$ ogyp ERR! find VS https://github.com/nodejs/node-gyp#on-windows
o# P' D9 s# f: @9 [gyp ERR! find VS **************************************************************
1 L+ k! ^6 L: q Xgyp ERR! find VS
0 n8 q* u9 i9 p5 @' c- Zgyp ERR! configure error* P% \, g4 t% L; P3 I% y4 M6 b5 K5 |
gyp ERR! stack Error: Could not find any Visual Studio installation to use: P5 I1 c* F; g# z9 h) n- E5 q1 Z
gyp ERR! stack at VisualStudioFinder.fail (D:\rymcu\electron-serialport\node_modules\node-gyp\lib\find-visualstu
- V- p1 Y/ J z2 }& R, ~" rdio.js:121:47)
3 g" F# e B& ~& ^$ k* `gyp ERR! stack at D:\rymcu\electron-serialport\node_modules\node-gyp\lib\find-visualstudio.js:74:161 N2 k1 L* z( H) J4 v
gyp ERR! stack at D:\rymcu\electron-serialport\node_modules\node-gyp\lib\find-visualstudio.js:372:168 C& x+ M; h/ D
gyp ERR! stack at D:\rymcu\electron-serialport\node_modules\node-gyp\lib\util.js:54:7$ @" F/ k! K, H
gyp ERR! stack at D:\rymcu\electron-serialport\node_modules\node-gyp\lib\util.js:33:16
6 A& m# w; \. D0 Mgyp ERR! stack at ChildProcess.exithandler (child_process.js:310:5)
. N! w1 K6 ]+ r3 x" jgyp ERR! stack at ChildProcess.emit (events.js:315:20)
$ I% r1 O( c1 u0 O# E' I' Rgyp ERR! stack at maybeClose (internal/child_process.js:1021:16)
1 B5 y F: E @/ @gyp ERR! stack at Process.ChildProcess._handle.onexit (internal/child_process.js:286:5): X( c5 F( l) E7 q
gyp ERR! System Windows_NT 10.0.15063 $ b9 x$ b! w$ p i% w1 o4 y' t
4 h# {- G+ o/ ~0 K) B# X, W
解决办法! u. k, t: Q0 P; @( a6 s& U- o. |
1、卸载nodejs重新安装一遍
6 J* [/ ]2 j1 N3 Y1 a( N
% a$ x+ W4 Y# ~2、设置淘宝镜像 npm config set registry https://registry.npm.taobao.org
; D7 r6 X0 E8 b+ a8 f6 l, f
' ^/ a' D" y `) h, W; o) c3、安装nodejs所需的环境(Visual Studio XX、python什么鬼的),执行这个命令会自动检测并帮你安装好,npm install --g --production windows-build-tools
5 p% B% V' N _& j: Y# K) \8 b————————————————
0 s' H2 n2 E6 \/ {6 V! z, Z' Q3 {版权声明:本文为CSDN博主「一点一滴成长」的原创文章,遵循CC 4.0 BY-SA版权协议,转载请附上原文出处链接及本声明。
1 M q& |8 E) G原文链接:https://blog.csdn.net/qq_39946015/article/details/127351920 |
|