|
|
报错信息:5 L- l8 H; i {* [0 I' [, L% \5 g
```bash, c" G+ _; f/ x3 w9 A7 c
gyp ERR! find VS
/ I* x( s1 \* {& Z4 ?4 P6 Lgyp ERR! find VS msvs_version not set from command line or npm config) Z* w- w& N% m5 C
gyp ERR! find VS running in VS Command Prompt, installation path is:4 ~/ C; s9 j" _: U+ P
gyp ERR! find VS "C:\Program Files (x86)\Microsoft Visual Studio\2017"
2 K; C/ W! i2 v, O- t. ]gyp ERR! find VS - will only use this version$ v5 d) C0 X2 b
gyp ERR! find VS could not use PowerShell to find Visual Studio 2017 or newer
" U% g G" A5 B2 }" egyp ERR! find VS looking for Visual Studio 2015/ ?5 m% s1 a6 F, Q5 ^9 w4 o! ~
gyp ERR! find VS - not found! r& n; t0 H! J' I5 B! ~' E6 A
gyp ERR! find VS looking for Visual Studio 20135 o# ], K' H9 A4 a" U8 N2 H
gyp ERR! find VS - not found
- c5 k1 s+ K9 T. Fgyp ERR! find VS; A' f* r' F9 q# \ P/ M! t
gyp ERR! find VS **************************************************************
$ g, ~, G5 b$ j. u/ P* egyp ERR! find VS You need to install the latest version of Visual Studio, I/ ?& n$ S1 w0 K) A: Y1 B: C ~
gyp ERR! find VS including the "Desktop development with C++" workload.
" ?* q6 c7 p0 A" U0 Q1 @gyp ERR! find VS For more information consult the documentation at:: n8 K/ b* k. p7 v
gyp ERR! find VS https://github.com/nodejs/node-gyp#on-windows
3 n. m+ v3 ~) ?7 F( c, R7 \( M8 }) ~gyp ERR! find VS **************************************************************1 U6 U8 U. K. b. C; |% U9 k
gyp ERR! find VS
, _! ^: I: o0 C, J% s5 ^gyp ERR! configure error
/ b3 u! p: n8 ]# J1 P' F( ogyp ERR! stack Error: Could not find any Visual Studio installation to use3 E9 l/ L- ]" _7 C
gyp ERR! stack at VisualStudioFinder.fail (D:\rymcu\electron-serialport\node_modules\node-gyp\lib\find-visualstu
* s' v, G1 `5 @+ Kdio.js:121:47)
3 b% C% Z2 j/ ^9 b5 \gyp ERR! stack at D:\rymcu\electron-serialport\node_modules\node-gyp\lib\find-visualstudio.js:74:16% N$ f8 o+ _) u* [
gyp ERR! stack at D:\rymcu\electron-serialport\node_modules\node-gyp\lib\find-visualstudio.js:372:16
0 x* s2 O, |) U3 k! cgyp ERR! stack at D:\rymcu\electron-serialport\node_modules\node-gyp\lib\util.js:54:7
5 w, x! v# `3 P+ d5 m2 Q% agyp ERR! stack at D:\rymcu\electron-serialport\node_modules\node-gyp\lib\util.js:33:163 V! D; q+ t7 l s
gyp ERR! stack at ChildProcess.exithandler (child_process.js:310:5), R) o6 m/ u t9 a8 ^! Z3 P1 _
gyp ERR! stack at ChildProcess.emit (events.js:315:20)7 w; ~4 j1 f2 ]9 h7 w ]
gyp ERR! stack at maybeClose (internal/child_process.js:1021:16)/ Y; I; H& I* J( X# a
gyp ERR! stack at Process.ChildProcess._handle.onexit (internal/child_process.js:286:5)! f2 k0 Z( N+ V# m
gyp ERR! System Windows_NT 10.0.15063 8 \! a* M0 ]1 }( f( ~' N9 Q+ m
4 C6 i( ?0 E$ n
解决办法
) H" u4 V, v- L! I6 c8 n. e1、卸载nodejs重新安装一遍
}( e) Y# ~# f& [, m& C0 R8 H% M0 ]2 _' H0 R, A; u
2、设置淘宝镜像 npm config set registry https://registry.npm.taobao.org$ D# e$ `6 o/ s+ Y0 I' Z8 H5 c
) ~7 L P5 O/ |
3、安装nodejs所需的环境(Visual Studio XX、python什么鬼的),执行这个命令会自动检测并帮你安装好,npm install --g --production windows-build-tools& ^1 W0 u- F/ G: f7 d0 A
————————————————: n( D Z( _5 n# y. L$ n% l. ?" G" E
版权声明:本文为CSDN博主「一点一滴成长」的原创文章,遵循CC 4.0 BY-SA版权协议,转载请附上原文出处链接及本声明。$ u3 s I1 @3 u: |9 D! l2 v
原文链接:https://blog.csdn.net/qq_39946015/article/details/127351920 |
|