|
报错信息:2 R9 j4 E& W* ]* ^) D) n
```bash) R( z. C0 }% o& c m
gyp ERR! find VS2 m; \- p, Q6 X9 T' y' U* O8 G
gyp ERR! find VS msvs_version not set from command line or npm config
; U% l% o* f8 k9 }8 A0 Ggyp ERR! find VS running in VS Command Prompt, installation path is:4 M# ~1 k& T" w( N/ c, s9 e1 `5 l
gyp ERR! find VS "C:\Program Files (x86)\Microsoft Visual Studio\2017"
2 r% Y5 h8 G$ l0 Mgyp ERR! find VS - will only use this version, y- n5 K, _- G5 v& u
gyp ERR! find VS could not use PowerShell to find Visual Studio 2017 or newer* V- x) V( q' [) C. t* @* f
gyp ERR! find VS looking for Visual Studio 2015
' e8 w: @: t1 M7 n* Mgyp ERR! find VS - not found! Y7 l" G% \" l) I
gyp ERR! find VS looking for Visual Studio 2013, Y, F( P% x* K# r: a
gyp ERR! find VS - not found
) b; @, N+ |1 hgyp ERR! find VS: x4 j# K9 g. t
gyp ERR! find VS **************************************************************
& o2 {" _$ S7 n% Qgyp ERR! find VS You need to install the latest version of Visual Studio
: R+ D/ T. ]( a% s. s( e2 z/ Ogyp ERR! find VS including the "Desktop development with C++" workload.1 O- f U _9 A- y# L: T% `
gyp ERR! find VS For more information consult the documentation at:
% O) h# z2 F# z' Z& f+ _7 G7 J' jgyp ERR! find VS https://github.com/nodejs/node-gyp#on-windows
; ^7 Y! |1 q5 A. ogyp ERR! find VS **************************************************************, |1 y! m6 i6 w! z6 K2 M$ E6 A
gyp ERR! find VS @3 q# V( c- {! o' `& U
gyp ERR! configure error
! Y1 Y6 B& B2 s" k! X; A, z! a# }gyp ERR! stack Error: Could not find any Visual Studio installation to use. j1 H3 J6 V0 D' Y. @0 }
gyp ERR! stack at VisualStudioFinder.fail (D:\rymcu\electron-serialport\node_modules\node-gyp\lib\find-visualstu
; c9 _$ Q, q6 wdio.js:121:47)
1 v& k3 g: Y: t" n) ]gyp ERR! stack at D:\rymcu\electron-serialport\node_modules\node-gyp\lib\find-visualstudio.js:74:16
" t- W: @# T/ P7 _# rgyp ERR! stack at D:\rymcu\electron-serialport\node_modules\node-gyp\lib\find-visualstudio.js:372:162 P: C& h' ~! _, Q, c5 d) L& K
gyp ERR! stack at D:\rymcu\electron-serialport\node_modules\node-gyp\lib\util.js:54:7, j1 S- F6 q6 P% Y: z
gyp ERR! stack at D:\rymcu\electron-serialport\node_modules\node-gyp\lib\util.js:33:16
% z6 g# g- W9 G) @4 Tgyp ERR! stack at ChildProcess.exithandler (child_process.js:310:5)
8 A5 E8 U5 u2 k9 lgyp ERR! stack at ChildProcess.emit (events.js:315:20)' c) A; l. X- C+ L" {# a- L
gyp ERR! stack at maybeClose (internal/child_process.js:1021:16)4 m9 v0 F3 ]7 t, A0 f/ c
gyp ERR! stack at Process.ChildProcess._handle.onexit (internal/child_process.js:286:5)5 | |4 e* D2 W- a' G
gyp ERR! System Windows_NT 10.0.15063
1 O" x0 _. F) ~' I, {2 y! ~' B/ Y$ g* P8 w
解决办法
' v6 J0 z7 u: C A1、卸载nodejs重新安装一遍
2 F% M1 x2 F, U. u) j# F
8 c4 ^: H3 @8 {( U( I @$ v2、设置淘宝镜像 npm config set registry https://registry.npm.taobao.org! ` C; J; D* N% R4 X% R+ P. l6 g
+ b. }2 X% c1 x0 f3、安装nodejs所需的环境(Visual Studio XX、python什么鬼的),执行这个命令会自动检测并帮你安装好,npm install --g --production windows-build-tools! w5 ^1 T9 J9 W4 \
————————————————6 d/ o7 K- w$ c+ y' [# _
版权声明:本文为CSDN博主「一点一滴成长」的原创文章,遵循CC 4.0 BY-SA版权协议,转载请附上原文出处链接及本声明。
& w! E: ~: {2 s+ x o$ A原文链接:https://blog.csdn.net/qq_39946015/article/details/127351920 |
|