|
|
报错信息:' O2 i0 d' u" A: q+ C' k
```bash- N+ E& S2 N! } G4 t0 r, @
gyp ERR! find VS
7 w a0 E$ r4 Y+ `4 W" Tgyp ERR! find VS msvs_version not set from command line or npm config% v2 E; _+ W1 | K7 _
gyp ERR! find VS running in VS Command Prompt, installation path is:
' q" N5 H* I' S5 R+ Q! ngyp ERR! find VS "C:\Program Files (x86)\Microsoft Visual Studio\2017"5 l7 ~, C* g- S) g# ^
gyp ERR! find VS - will only use this version7 y4 G0 S* Q+ x+ a
gyp ERR! find VS could not use PowerShell to find Visual Studio 2017 or newer" Z* E) M8 u0 U4 ~
gyp ERR! find VS looking for Visual Studio 2015( P- i+ k# e) Y w
gyp ERR! find VS - not found
- \$ P; J: z( K& h2 |gyp ERR! find VS looking for Visual Studio 2013
8 C1 c, H; i9 z) T3 a( ^gyp ERR! find VS - not found
! V/ t R S" t2 ^' K% n2 Egyp ERR! find VS
2 l! y9 m+ m6 [0 T, g. e5 Ogyp ERR! find VS **************************************************************
6 V z! u% J- G w0 V; N( P' _' g0 Z, U8 dgyp ERR! find VS You need to install the latest version of Visual Studio2 E9 D0 F+ h. p, a. k& H2 \. M
gyp ERR! find VS including the "Desktop development with C++" workload.
" V' J: m/ j- o; Xgyp ERR! find VS For more information consult the documentation at:
/ r$ V0 o' G4 ?! Xgyp ERR! find VS https://github.com/nodejs/node-gyp#on-windows
: H; h- v( D% K3 V1 pgyp ERR! find VS **************************************************************, H9 }/ u+ z4 k9 b5 D1 y0 N
gyp ERR! find VS
& l) ?7 q! z8 V( ]gyp ERR! configure error, L0 Y8 r% H- O; j$ ]
gyp ERR! stack Error: Could not find any Visual Studio installation to use2 F' y( w, _" ]
gyp ERR! stack at VisualStudioFinder.fail (D:\rymcu\electron-serialport\node_modules\node-gyp\lib\find-visualstu
& Q, I! ?3 E7 X, pdio.js:121:47). U# k6 ]. a5 |! e( F2 J3 e5 H
gyp ERR! stack at D:\rymcu\electron-serialport\node_modules\node-gyp\lib\find-visualstudio.js:74:16
$ l. E8 [1 C1 o# R% {7 X$ r% d ]( R, Sgyp ERR! stack at D:\rymcu\electron-serialport\node_modules\node-gyp\lib\find-visualstudio.js:372:16# N0 Z4 ]9 x! _6 e" V6 o8 t
gyp ERR! stack at D:\rymcu\electron-serialport\node_modules\node-gyp\lib\util.js:54:7
5 ] j' X B, N N: K$ Q* q: ~gyp ERR! stack at D:\rymcu\electron-serialport\node_modules\node-gyp\lib\util.js:33:16+ K. o4 U( e6 o' f; J
gyp ERR! stack at ChildProcess.exithandler (child_process.js:310:5)1 t. H1 J2 y8 [# b H, l* a" p
gyp ERR! stack at ChildProcess.emit (events.js:315:20); V* m' y6 T! g2 W
gyp ERR! stack at maybeClose (internal/child_process.js:1021:16); W; \2 a& S9 h4 }
gyp ERR! stack at Process.ChildProcess._handle.onexit (internal/child_process.js:286:5)- J3 a% }7 M. f& S _
gyp ERR! System Windows_NT 10.0.15063 " X; X8 S6 J: l4 e
F8 n3 R; d) D$ @- w9 K3 q& }解决办法
7 s& a( g9 H# G: B# o! k9 W1、卸载nodejs重新安装一遍 o# y% _) H- u
! E6 _7 b) n) B
2、设置淘宝镜像 npm config set registry https://registry.npm.taobao.org
$ f, j* e' [! O) w1 E
$ w2 [2 W& A, P" k/ p |3、安装nodejs所需的环境(Visual Studio XX、python什么鬼的),执行这个命令会自动检测并帮你安装好,npm install --g --production windows-build-tools' X4 l& U/ P7 F
————————————————
+ U( |+ }9 @% L! E版权声明:本文为CSDN博主「一点一滴成长」的原创文章,遵循CC 4.0 BY-SA版权协议,转载请附上原文出处链接及本声明。
+ i, b+ {7 p* A9 Q0 I+ F3 t原文链接:https://blog.csdn.net/qq_39946015/article/details/127351920 |
|