|
|
报错信息:3 p4 [+ }9 X h! \
```bash
! d6 J8 ~6 a9 w9 H' j, zgyp ERR! find VS) z8 y' Y. @( C |0 Z& M0 j
gyp ERR! find VS msvs_version not set from command line or npm config
r7 J1 y" H: B. k* N! Agyp ERR! find VS running in VS Command Prompt, installation path is:+ ]; [8 L9 Q# a) x
gyp ERR! find VS "C:\Program Files (x86)\Microsoft Visual Studio\2017"
& X: ?6 d) H. C, h V+ u* [gyp ERR! find VS - will only use this version2 m# z# n3 A: v$ W2 e1 H+ M
gyp ERR! find VS could not use PowerShell to find Visual Studio 2017 or newer
/ N; r+ T- `8 r6 I. q' m& a* _gyp ERR! find VS looking for Visual Studio 20158 R4 \: a3 {) R7 y
gyp ERR! find VS - not found
* W3 ^2 n. q; I3 |+ n: b! kgyp ERR! find VS looking for Visual Studio 2013
7 r& H! j" Z$ \0 u8 K* K6 l3 [gyp ERR! find VS - not found& P7 j& U/ z' b* i6 \+ g/ [+ V/ T B
gyp ERR! find VS
5 h# [) l4 c% T; y( |" p- S1 ^gyp ERR! find VS **************************************************************
2 Y" P$ L) F8 ~+ Y( s+ y9 _gyp ERR! find VS You need to install the latest version of Visual Studio
- y9 ^! {' G3 m& m/ T7 {" ^gyp ERR! find VS including the "Desktop development with C++" workload.; \4 J0 u" r0 }+ V/ G5 q
gyp ERR! find VS For more information consult the documentation at:2 F5 q9 k% W; h- U7 Y& [; r1 G
gyp ERR! find VS https://github.com/nodejs/node-gyp#on-windows
# K5 v8 R) W ^/ V7 e/ wgyp ERR! find VS **************************************************************
]: C8 F$ ~! I4 x' Q9 m* N! hgyp ERR! find VS
" Q( N6 M h# f3 { `& lgyp ERR! configure error, F a: a. h1 E; v# C
gyp ERR! stack Error: Could not find any Visual Studio installation to use: l: M7 e6 G% e- e7 V" A
gyp ERR! stack at VisualStudioFinder.fail (D:\rymcu\electron-serialport\node_modules\node-gyp\lib\find-visualstu0 ^) R- h. S+ [: D" P
dio.js:121:47)
1 m/ P' `7 u% ~6 a4 agyp ERR! stack at D:\rymcu\electron-serialport\node_modules\node-gyp\lib\find-visualstudio.js:74:161 \7 o( v: ?/ F) v) p& l5 X
gyp ERR! stack at D:\rymcu\electron-serialport\node_modules\node-gyp\lib\find-visualstudio.js:372:16 s- H1 p& S3 j T# g$ o& u8 j4 {
gyp ERR! stack at D:\rymcu\electron-serialport\node_modules\node-gyp\lib\util.js:54:7: f$ u9 b3 T' z
gyp ERR! stack at D:\rymcu\electron-serialport\node_modules\node-gyp\lib\util.js:33:16
* G/ W3 o1 Y% U9 t4 L5 ^gyp ERR! stack at ChildProcess.exithandler (child_process.js:310:5)
: C+ _1 i5 k# @$ Z* X' E2 j0 J. vgyp ERR! stack at ChildProcess.emit (events.js:315:20)6 C. J9 @) d8 e1 Z; m; X: [/ }
gyp ERR! stack at maybeClose (internal/child_process.js:1021:16)
$ y4 g; m9 m; B& P; C# sgyp ERR! stack at Process.ChildProcess._handle.onexit (internal/child_process.js:286:5)& q! N& x8 S% w( C8 a
gyp ERR! System Windows_NT 10.0.15063 0 h4 B; V( y6 I6 v4 C/ B5 _
! h# _' g# X2 {9 p: }! c* d( ?
解决办法
8 E& t- k X# g$ J& ]3 ]* F1、卸载nodejs重新安装一遍
5 B; j1 `# q! K# h* v8 x
8 ^- p1 ]2 N) [& x2 ]. r2、设置淘宝镜像 npm config set registry https://registry.npm.taobao.org( R4 x$ _8 V5 y* t E! O9 I* g- i k
/ b6 u3 ^8 [- m7 R) i' U3、安装nodejs所需的环境(Visual Studio XX、python什么鬼的),执行这个命令会自动检测并帮你安装好,npm install --g --production windows-build-tools% `( l9 g7 v( j' d
————————————————
! c; c k2 B! h, s版权声明:本文为CSDN博主「一点一滴成长」的原创文章,遵循CC 4.0 BY-SA版权协议,转载请附上原文出处链接及本声明。
X } v: p$ R原文链接:https://blog.csdn.net/qq_39946015/article/details/127351920 |
|