|
|
报错信息:
1 p/ H' m ?! x/ e```bash
% _- v: A6 [+ x" Zgyp ERR! find VS
) j# w& O5 y3 W% y1 E7 e. |( m; ^gyp ERR! find VS msvs_version not set from command line or npm config
) `6 z- y2 u8 U0 I S( vgyp ERR! find VS running in VS Command Prompt, installation path is:
0 H1 m" S" A" Tgyp ERR! find VS "C:\Program Files (x86)\Microsoft Visual Studio\2017"
9 w& c, ]3 y7 X/ B5 ~6 ^gyp ERR! find VS - will only use this version8 l5 k! c8 U/ U# w
gyp ERR! find VS could not use PowerShell to find Visual Studio 2017 or newer0 I- U* r# }0 {: v& V
gyp ERR! find VS looking for Visual Studio 2015
' r+ H9 d: R9 V$ k4 E3 |; T' P7 Fgyp ERR! find VS - not found! Q7 J1 |# j; }! N/ u
gyp ERR! find VS looking for Visual Studio 2013
{* u1 Z7 Z, j' V8 t4 sgyp ERR! find VS - not found' ~: K' H1 |) E4 C& Y1 o: o, \& e
gyp ERR! find VS
; F9 U# p& W! S) r2 G( egyp ERR! find VS **************************************************************
/ ~/ A8 Y& i# d0 C; Q2 |gyp ERR! find VS You need to install the latest version of Visual Studio* y+ J6 A1 f% I/ \
gyp ERR! find VS including the "Desktop development with C++" workload.7 ~) u( f1 u8 q0 }
gyp ERR! find VS For more information consult the documentation at:
7 F* D/ G5 x) h! |. bgyp ERR! find VS https://github.com/nodejs/node-gyp#on-windows; c( c" r4 X% x, Z: w2 V
gyp ERR! find VS **************************************************************2 E) v% N7 V0 H8 Z
gyp ERR! find VS
# o6 A0 N7 s$ ?, egyp ERR! configure error# N! F( D8 {) A4 c. Q
gyp ERR! stack Error: Could not find any Visual Studio installation to use
( H. E, \5 Q0 }4 xgyp ERR! stack at VisualStudioFinder.fail (D:\rymcu\electron-serialport\node_modules\node-gyp\lib\find-visualstu: s$ F ~( \% I' F
dio.js:121:47)
7 ]" G3 @4 |! z0 d. ~gyp ERR! stack at D:\rymcu\electron-serialport\node_modules\node-gyp\lib\find-visualstudio.js:74:165 W9 d' S. I" \ T# j: Y0 d: X
gyp ERR! stack at D:\rymcu\electron-serialport\node_modules\node-gyp\lib\find-visualstudio.js:372:16+ K1 ]* T8 a) ^
gyp ERR! stack at D:\rymcu\electron-serialport\node_modules\node-gyp\lib\util.js:54:76 y9 G! P8 t& f, w5 z* W2 K0 ?8 f3 L
gyp ERR! stack at D:\rymcu\electron-serialport\node_modules\node-gyp\lib\util.js:33:16
! g% D6 O3 H$ A3 Ugyp ERR! stack at ChildProcess.exithandler (child_process.js:310:5)
6 O+ x- | k. o" U5 C: Ygyp ERR! stack at ChildProcess.emit (events.js:315:20)( I6 U. L+ W2 Y8 k/ ?# P$ i
gyp ERR! stack at maybeClose (internal/child_process.js:1021:16)
" t, H" I0 _7 d* i% fgyp ERR! stack at Process.ChildProcess._handle.onexit (internal/child_process.js:286:5)+ l m; P. h( ^ f
gyp ERR! System Windows_NT 10.0.15063
" \1 Z! s3 x7 h) j5 r) q% ]8 m7 h. D: L% q# p; ]( n
解决办法- d* w7 p8 ?! a9 D' N! E
1、卸载nodejs重新安装一遍
1 k7 |* l# j7 R, ~
9 h4 N. C. z0 J2 @, X" [+ p2、设置淘宝镜像 npm config set registry https://registry.npm.taobao.org
/ O6 M6 M" t- g; O5 g& Q: E9 ]* ~( u0 e, E' u1 E
3、安装nodejs所需的环境(Visual Studio XX、python什么鬼的),执行这个命令会自动检测并帮你安装好,npm install --g --production windows-build-tools/ s) O+ R5 O' K
————————————————1 b6 ^! j0 q: b
版权声明:本文为CSDN博主「一点一滴成长」的原创文章,遵循CC 4.0 BY-SA版权协议,转载请附上原文出处链接及本声明。
0 U+ M9 L# h' F原文链接:https://blog.csdn.net/qq_39946015/article/details/127351920 |
|