|
|
报错信息:
, a8 ~: Q5 \ V9 s& e```bash$ @' C: m/ Z: A2 J! k/ ?3 \. [( \
gyp ERR! find VS- J# _- L8 E& ]0 g; [' T& M
gyp ERR! find VS msvs_version not set from command line or npm config
. r: f( v; I, _! ?" mgyp ERR! find VS running in VS Command Prompt, installation path is:
: G+ [/ l3 x( @$ W. z. t$ z" C4 Zgyp ERR! find VS "C:\Program Files (x86)\Microsoft Visual Studio\2017"
7 ?( h3 P% ~% }( o: Wgyp ERR! find VS - will only use this version
- Z( d2 R/ X9 ^) p- |gyp ERR! find VS could not use PowerShell to find Visual Studio 2017 or newer3 R( r0 Q/ N9 X" g/ s6 V- R! A) f
gyp ERR! find VS looking for Visual Studio 2015' H2 m& ~+ u/ a# ^* i/ @
gyp ERR! find VS - not found: J) D. ]! P R9 ~
gyp ERR! find VS looking for Visual Studio 20135 i/ ]+ E( o0 N6 j3 H5 w# y
gyp ERR! find VS - not found
. z: J# F2 I6 A3 E! @, _5 Cgyp ERR! find VS3 K$ ?; `0 W/ B# O% P" I0 J
gyp ERR! find VS **************************************************************
; l9 i8 f o1 H5 Q& X) l% Ogyp ERR! find VS You need to install the latest version of Visual Studio
% e) O% Z: D* _* y1 bgyp ERR! find VS including the "Desktop development with C++" workload.
, R' u( U$ F7 M: `gyp ERR! find VS For more information consult the documentation at:" z. v9 F! I' C* s
gyp ERR! find VS https://github.com/nodejs/node-gyp#on-windows
& S+ e4 s0 b5 {- `5 {gyp ERR! find VS **************************************************************) u8 e8 D y# `, O
gyp ERR! find VS
( ], C+ P& N$ }! X% x; S+ Lgyp ERR! configure error) `0 S* z' H7 s' c2 H6 l
gyp ERR! stack Error: Could not find any Visual Studio installation to use9 s" a. O. g; j3 G6 W
gyp ERR! stack at VisualStudioFinder.fail (D:\rymcu\electron-serialport\node_modules\node-gyp\lib\find-visualstu. d _$ T8 Z7 M+ K2 A c! v
dio.js:121:47)! K3 a! w2 R1 O4 p$ I% _
gyp ERR! stack at D:\rymcu\electron-serialport\node_modules\node-gyp\lib\find-visualstudio.js:74:16
" t0 _. A8 _# sgyp ERR! stack at D:\rymcu\electron-serialport\node_modules\node-gyp\lib\find-visualstudio.js:372:16
% E7 o0 f2 `+ G' ^9 kgyp ERR! stack at D:\rymcu\electron-serialport\node_modules\node-gyp\lib\util.js:54:7
& u5 n9 u( f& D6 t: xgyp ERR! stack at D:\rymcu\electron-serialport\node_modules\node-gyp\lib\util.js:33:16* J( U2 O5 }7 P% I# R
gyp ERR! stack at ChildProcess.exithandler (child_process.js:310:5), ?2 O% A O4 ?2 {: S
gyp ERR! stack at ChildProcess.emit (events.js:315:20)' j: T2 t( j+ |, t) b
gyp ERR! stack at maybeClose (internal/child_process.js:1021:16)( b. _- \( X, H+ J% @# R" J
gyp ERR! stack at Process.ChildProcess._handle.onexit (internal/child_process.js:286:5)
7 O5 c) e) I& M9 X- W) Tgyp ERR! System Windows_NT 10.0.15063 1 Y6 H9 @1 f# E5 f! h4 _5 E
( @/ q C; k7 V2 T解决办法- q: p; I5 v5 I7 b
1、卸载nodejs重新安装一遍
0 r9 S# `# Q) J* W. l! D
7 G. w+ r" X- X0 Z( ~2 O2、设置淘宝镜像 npm config set registry https://registry.npm.taobao.org& S- _5 ~8 T* M" M
/ l ~7 D" @# X
3、安装nodejs所需的环境(Visual Studio XX、python什么鬼的),执行这个命令会自动检测并帮你安装好,npm install --g --production windows-build-tools
' s) p; P6 j/ ?% } c8 x————————————————
4 G4 w! @# ~; L2 U: {' i: @5 T3 K/ q$ ~版权声明:本文为CSDN博主「一点一滴成长」的原创文章,遵循CC 4.0 BY-SA版权协议,转载请附上原文出处链接及本声明。
. f1 Y# R* L/ W) U* W% J) T- B5 ?原文链接:https://blog.csdn.net/qq_39946015/article/details/127351920 |
|