|
|
报错信息:! |! ]! }0 w8 Z" T
```bash \3 _6 G; K! x$ Z g: \& y
gyp ERR! find VS0 q- c& {! J+ C2 M
gyp ERR! find VS msvs_version not set from command line or npm config2 r/ J( _) g9 l, G, |
gyp ERR! find VS running in VS Command Prompt, installation path is:4 ]0 [; K% |; v; ^( S4 E
gyp ERR! find VS "C:\Program Files (x86)\Microsoft Visual Studio\2017"
9 A* z: ] Q9 d# Y& U. c" p, I8 L# t' b: agyp ERR! find VS - will only use this version
" Q- X( h4 E. p( d0 Dgyp ERR! find VS could not use PowerShell to find Visual Studio 2017 or newer
' |7 X! B7 v1 {gyp ERR! find VS looking for Visual Studio 2015
) @- l2 r% z' Fgyp ERR! find VS - not found
' q+ }% D# v1 B" h, v3 k T. @gyp ERR! find VS looking for Visual Studio 2013
, u/ I3 _# R4 K5 e' Hgyp ERR! find VS - not found
d- a/ h5 x9 _! A$ Z2 r% x+ pgyp ERR! find VS
( D: h+ M& p) U; [& `+ u9 j, S9 fgyp ERR! find VS **************************************************************4 s, H4 M# U( w% s( W7 @2 I
gyp ERR! find VS You need to install the latest version of Visual Studio
; a$ |9 b* R/ }" Xgyp ERR! find VS including the "Desktop development with C++" workload.' d- P/ l D$ F* U
gyp ERR! find VS For more information consult the documentation at:
' F1 }6 _" N0 t* H( K% @gyp ERR! find VS https://github.com/nodejs/node-gyp#on-windows
) }7 m' c6 t6 K/ k8 Wgyp ERR! find VS **************************************************************3 U6 d0 F' j7 B& K
gyp ERR! find VS
* k/ C, {" b; i! lgyp ERR! configure error
1 x9 e1 W: D8 U: [" H! Y/ \% A* a9 I, Cgyp ERR! stack Error: Could not find any Visual Studio installation to use
/ H+ `4 N8 g9 K1 ^gyp ERR! stack at VisualStudioFinder.fail (D:\rymcu\electron-serialport\node_modules\node-gyp\lib\find-visualstu
! R( l4 @' ], I/ ^dio.js:121:47)
# R" D0 A4 x% i+ J2 }gyp ERR! stack at D:\rymcu\electron-serialport\node_modules\node-gyp\lib\find-visualstudio.js:74:16
: p0 R! B7 Y/ Z2 K' O5 dgyp ERR! stack at D:\rymcu\electron-serialport\node_modules\node-gyp\lib\find-visualstudio.js:372:16$ ^" _. a1 T4 t& h+ y1 Q# S
gyp ERR! stack at D:\rymcu\electron-serialport\node_modules\node-gyp\lib\util.js:54:7# e# n1 K X5 @6 f. @2 Y
gyp ERR! stack at D:\rymcu\electron-serialport\node_modules\node-gyp\lib\util.js:33:165 K/ e) W @& V9 R2 L% R
gyp ERR! stack at ChildProcess.exithandler (child_process.js:310:5)
- V% P2 a5 v, m; L0 r0 B9 V' Kgyp ERR! stack at ChildProcess.emit (events.js:315:20)
, G4 m0 @, I) m- ]gyp ERR! stack at maybeClose (internal/child_process.js:1021:16)* A- i- c" H3 e
gyp ERR! stack at Process.ChildProcess._handle.onexit (internal/child_process.js:286:5)7 s2 f% e, Z% M& ~+ t* [, v
gyp ERR! System Windows_NT 10.0.15063
# P% h+ _; J6 U' ]" {' O5 y1 `# J( D% P) B7 _* W
解决办法
4 o( ?' W7 B# e3 c/ f% R% [1、卸载nodejs重新安装一遍- p3 j' c2 c/ N' V# _
' j$ A5 `: D' H3 D2、设置淘宝镜像 npm config set registry https://registry.npm.taobao.org4 |5 F7 {5 J7 p" V+ T" b
% {& O* e' a( W- d3 V
3、安装nodejs所需的环境(Visual Studio XX、python什么鬼的),执行这个命令会自动检测并帮你安装好,npm install --g --production windows-build-tools
! q4 ]6 @1 d4 X, ^' p————————————————3 n; C+ v2 q- {* v( P4 w- M+ H e
版权声明:本文为CSDN博主「一点一滴成长」的原创文章,遵循CC 4.0 BY-SA版权协议,转载请附上原文出处链接及本声明。; m/ ?1 e5 [: w
原文链接:https://blog.csdn.net/qq_39946015/article/details/127351920 |
|