|
报错信息:& m4 ? {$ ?* I( f5 ] @: g
```bash
5 v; [) w: Q/ Igyp ERR! find VS3 V7 }' f5 ?" i0 x2 o6 L# Y
gyp ERR! find VS msvs_version not set from command line or npm config6 J5 I3 v4 e' H% d8 C. c- u. r6 l
gyp ERR! find VS running in VS Command Prompt, installation path is:5 c0 O0 R8 |+ I, M6 p( P% q) R& ^: [
gyp ERR! find VS "C:\Program Files (x86)\Microsoft Visual Studio\2017"
7 h X. t7 I) V& h. M8 d4 [: Bgyp ERR! find VS - will only use this version& T6 Z' O: p* o7 `
gyp ERR! find VS could not use PowerShell to find Visual Studio 2017 or newer
: `$ x) P. {2 e4 A. [gyp ERR! find VS looking for Visual Studio 2015. l; K4 l d7 c; n
gyp ERR! find VS - not found
2 Q7 D( L" V; e9 e3 Kgyp ERR! find VS looking for Visual Studio 2013
& v; d+ O0 j# F+ m& Agyp ERR! find VS - not found" a2 C7 H- E! o( G; p8 r
gyp ERR! find VS& s3 G7 `; h6 n2 g) B% W; v v0 s
gyp ERR! find VS **************************************************************# { L; N S7 j- I) \1 P
gyp ERR! find VS You need to install the latest version of Visual Studio
& j" z- v- K! M! S4 V$ E, sgyp ERR! find VS including the "Desktop development with C++" workload.
) b- W# H9 r7 W' W zgyp ERR! find VS For more information consult the documentation at:8 G6 S" T% z5 d
gyp ERR! find VS https://github.com/nodejs/node-gyp#on-windows0 [7 x7 Y* B: o2 k7 |
gyp ERR! find VS **************************************************************
/ _$ C% m! {/ o! K* Y: G6 [gyp ERR! find VS8 U; V- L! P" I% O9 p" \& B3 Q7 |
gyp ERR! configure error
, E9 P! T6 W: t4 `" Igyp ERR! stack Error: Could not find any Visual Studio installation to use: \* X9 x6 k/ z0 C; V; |2 g
gyp ERR! stack at VisualStudioFinder.fail (D:\rymcu\electron-serialport\node_modules\node-gyp\lib\find-visualstu
$ P) g6 Y$ g7 w2 o# C9 hdio.js:121:47)
( b) u3 P( Q6 k, `4 fgyp ERR! stack at D:\rymcu\electron-serialport\node_modules\node-gyp\lib\find-visualstudio.js:74:16% y. L- x1 P5 { L1 ?/ n
gyp ERR! stack at D:\rymcu\electron-serialport\node_modules\node-gyp\lib\find-visualstudio.js:372:16+ c8 G. a# j$ `) J7 z
gyp ERR! stack at D:\rymcu\electron-serialport\node_modules\node-gyp\lib\util.js:54:7
9 y x& w8 H! _6 Ggyp ERR! stack at D:\rymcu\electron-serialport\node_modules\node-gyp\lib\util.js:33:16
0 d( U! a: Q! M! J5 v- Ggyp ERR! stack at ChildProcess.exithandler (child_process.js:310:5)- ^. y B( O' Z5 M& k7 W
gyp ERR! stack at ChildProcess.emit (events.js:315:20)8 ]1 A4 m( Q4 M2 `- `4 W& @
gyp ERR! stack at maybeClose (internal/child_process.js:1021:16)
: U. H: n1 i. X+ g* \4 @gyp ERR! stack at Process.ChildProcess._handle.onexit (internal/child_process.js:286:5)
8 I' g8 T7 M9 h. }$ P. Dgyp ERR! System Windows_NT 10.0.15063
, }9 G. \* ~; O0 l
% ?* @3 q4 k2 ?1 p' r7 a5 [解决办法
S; Y3 j& G' W& I1、卸载nodejs重新安装一遍
( w O, A" I0 e# o
/ D/ f5 J2 E6 |# w: t8 d$ ]5 R2、设置淘宝镜像 npm config set registry https://registry.npm.taobao.org
: a% ]- q. @: u8 }% v6 U/ L! ]: X, e
3、安装nodejs所需的环境(Visual Studio XX、python什么鬼的),执行这个命令会自动检测并帮你安装好,npm install --g --production windows-build-tools
/ ?/ A8 W: n4 J7 B3 J3 u" M/ I————————————————: |4 H( n( D% ?5 K, I- P
版权声明:本文为CSDN博主「一点一滴成长」的原创文章,遵循CC 4.0 BY-SA版权协议,转载请附上原文出处链接及本声明。
" `% F& f$ F6 o原文链接:https://blog.csdn.net/qq_39946015/article/details/127351920 |
|