|
|
报错信息:
- v, S2 m: b" c```bash
! J* X6 F3 W# D( W6 A# Qgyp ERR! find VS
. _9 o4 v! o" sgyp ERR! find VS msvs_version not set from command line or npm config
' \# X! K! w5 U- R( {gyp ERR! find VS running in VS Command Prompt, installation path is:
}4 f6 A3 z& Y' W/ R, Igyp ERR! find VS "C:\Program Files (x86)\Microsoft Visual Studio\2017"
4 G$ I$ y: _. Y" L9 A1 e* Cgyp ERR! find VS - will only use this version0 M% `2 Y3 S/ m9 d W+ s
gyp ERR! find VS could not use PowerShell to find Visual Studio 2017 or newer
3 g: g9 d; y' rgyp ERR! find VS looking for Visual Studio 2015
; Q+ \1 a! y8 |, R: @4 P2 r+ [gyp ERR! find VS - not found! Y: n% p _+ ]5 `/ n
gyp ERR! find VS looking for Visual Studio 2013: L9 b5 @4 d5 A' J% [
gyp ERR! find VS - not found
% B$ V2 B$ u* p. E! R3 W/ Z4 ]gyp ERR! find VS
4 D9 d: t! V, R8 L8 Y9 ?2 qgyp ERR! find VS **************************************************************
, w: f9 U. k' t( c9 j2 Cgyp ERR! find VS You need to install the latest version of Visual Studio& H0 T! R! i7 ]1 F Q7 @
gyp ERR! find VS including the "Desktop development with C++" workload.& ?% h7 P3 U6 c# r
gyp ERR! find VS For more information consult the documentation at:. I' I. B2 I2 H+ \# N
gyp ERR! find VS https://github.com/nodejs/node-gyp#on-windows
$ R1 g" p: ?) |+ s( ]gyp ERR! find VS **************************************************************" \) F( R% z+ O" P X2 M4 K
gyp ERR! find VS
+ b! k* p- c+ q+ [1 hgyp ERR! configure error
" P3 z6 S3 E0 \, O$ x8 [! _& Xgyp ERR! stack Error: Could not find any Visual Studio installation to use
0 B: h" P. [4 r& z g9 v( ugyp ERR! stack at VisualStudioFinder.fail (D:\rymcu\electron-serialport\node_modules\node-gyp\lib\find-visualstu8 I C& h$ Q) x' S
dio.js:121:47)
# \; P5 h* F6 t. B0 ?gyp ERR! stack at D:\rymcu\electron-serialport\node_modules\node-gyp\lib\find-visualstudio.js:74:16
/ U# r5 `& A4 i0 Q7 {/ jgyp ERR! stack at D:\rymcu\electron-serialport\node_modules\node-gyp\lib\find-visualstudio.js:372:16
# E$ u0 u/ Y! L' M- lgyp ERR! stack at D:\rymcu\electron-serialport\node_modules\node-gyp\lib\util.js:54:7
9 q' a% E4 Q2 L0 N0 t$ Sgyp ERR! stack at D:\rymcu\electron-serialport\node_modules\node-gyp\lib\util.js:33:16
+ y* L" v1 h! s: x, J/ {7 C" }5 Xgyp ERR! stack at ChildProcess.exithandler (child_process.js:310:5)
2 T% F( p& D# q1 q. g5 rgyp ERR! stack at ChildProcess.emit (events.js:315:20)
: G6 H8 Q* |! D e$ D3 A3 v, e) Ngyp ERR! stack at maybeClose (internal/child_process.js:1021:16)
: ?. H& d: p& r. Qgyp ERR! stack at Process.ChildProcess._handle.onexit (internal/child_process.js:286:5)
( }8 Z7 ?; A5 w8 b# egyp ERR! System Windows_NT 10.0.15063 8 Z# G3 T4 K# g4 H" O3 U. ^
/ ~% N: t: ^- n2 v. P
解决办法
; ]% X/ l. ^, T& o4 I. J9 f1、卸载nodejs重新安装一遍$ ?5 F: C+ ]6 X( z5 x! ~
* H b# ?, E% Q2 Q4 U2、设置淘宝镜像 npm config set registry https://registry.npm.taobao.org( {5 n5 a* }/ `7 O5 o$ l; b
4 m8 Z7 y( R' `1 w9 ~6 H: n3、安装nodejs所需的环境(Visual Studio XX、python什么鬼的),执行这个命令会自动检测并帮你安装好,npm install --g --production windows-build-tools; v( |' p7 R8 p( f2 P7 M7 s
————————————————
) h% c v; u9 v. k" x2 Y8 l版权声明:本文为CSDN博主「一点一滴成长」的原创文章,遵循CC 4.0 BY-SA版权协议,转载请附上原文出处链接及本声明。# B, ~$ |( d7 B2 A# l
原文链接:https://blog.csdn.net/qq_39946015/article/details/127351920 |
|