|
|
报错信息:7 @# P: _* r1 H3 V7 c: U
```bash2 t* S w6 O) a/ Z
gyp ERR! find VS
& @/ K8 i2 G7 s8 X7 g0 Egyp ERR! find VS msvs_version not set from command line or npm config
, V1 e; _4 R% s& Z% R; b3 Kgyp ERR! find VS running in VS Command Prompt, installation path is:
" J# X; G( q8 w. E# u3 B# m) h$ Tgyp ERR! find VS "C:\Program Files (x86)\Microsoft Visual Studio\2017") I4 K' Q; b: s, S' W3 W- Q' d
gyp ERR! find VS - will only use this version) j) ?# K) V! T% W: k
gyp ERR! find VS could not use PowerShell to find Visual Studio 2017 or newer, g, e, S# N+ E! U6 v5 m5 ?
gyp ERR! find VS looking for Visual Studio 2015; E+ l( V/ s7 V' y
gyp ERR! find VS - not found
% c5 Q$ i- B6 I) N+ i Kgyp ERR! find VS looking for Visual Studio 2013# x8 {3 o+ c! _- c1 F+ p$ Y
gyp ERR! find VS - not found9 T$ f. f2 H0 v1 O
gyp ERR! find VS7 m; z4 m* U7 K Y* ]* k4 \5 O
gyp ERR! find VS **************************************************************6 T4 N# W3 w* y3 g. R3 \ W2 Z
gyp ERR! find VS You need to install the latest version of Visual Studio
" z. G7 P$ i+ a7 O' H# y; kgyp ERR! find VS including the "Desktop development with C++" workload.9 C) Z9 i/ z- m/ T- D" N
gyp ERR! find VS For more information consult the documentation at:
( F$ T { E% i4 |+ G0 pgyp ERR! find VS https://github.com/nodejs/node-gyp#on-windows
* v9 i: b* U$ h) t5 Zgyp ERR! find VS **************************************************************
9 C7 u7 ^. @3 M) }gyp ERR! find VS1 w5 N% j- y8 W5 V( ]5 \3 y9 m% d
gyp ERR! configure error0 c, S% q- G6 ]' H+ }5 }9 y
gyp ERR! stack Error: Could not find any Visual Studio installation to use4 f6 a) r% P3 L8 s4 T
gyp ERR! stack at VisualStudioFinder.fail (D:\rymcu\electron-serialport\node_modules\node-gyp\lib\find-visualstu* B) I: C) ?( T& {9 U0 T& X
dio.js:121:47)) [, _2 s% P ], W/ v9 |8 i
gyp ERR! stack at D:\rymcu\electron-serialport\node_modules\node-gyp\lib\find-visualstudio.js:74:16% x8 } [0 t( }2 N; e+ \! p
gyp ERR! stack at D:\rymcu\electron-serialport\node_modules\node-gyp\lib\find-visualstudio.js:372:16
( d l1 |/ o) }- Qgyp ERR! stack at D:\rymcu\electron-serialport\node_modules\node-gyp\lib\util.js:54:7
|7 v$ S6 f) S! F6 E2 T& m& i2 tgyp ERR! stack at D:\rymcu\electron-serialport\node_modules\node-gyp\lib\util.js:33:16% o/ u9 n2 n' v1 V8 S
gyp ERR! stack at ChildProcess.exithandler (child_process.js:310:5)9 N- t9 c5 Q6 Y
gyp ERR! stack at ChildProcess.emit (events.js:315:20)
6 {+ K: t9 z& W9 i; W- p0 u. w5 Rgyp ERR! stack at maybeClose (internal/child_process.js:1021:16)
$ g) s2 o1 \$ u8 W7 }( L/ ?7 sgyp ERR! stack at Process.ChildProcess._handle.onexit (internal/child_process.js:286:5)* v, ?% i0 p0 X% f+ X
gyp ERR! System Windows_NT 10.0.15063 $ O2 H; V/ U! R0 {
9 \" L' R% g7 T% Q6 @) u
解决办法
! g! j7 c3 k/ z% _. z1、卸载nodejs重新安装一遍
+ _+ Q, ]; U: C
6 H0 q" X# c0 W2、设置淘宝镜像 npm config set registry https://registry.npm.taobao.org" g+ }* i/ Z- O. Z
/ Y$ ~' t' V9 k3 U) U3、安装nodejs所需的环境(Visual Studio XX、python什么鬼的),执行这个命令会自动检测并帮你安装好,npm install --g --production windows-build-tools
5 C4 N- l B, [! s2 p————————————————
! t, T% `/ m. C# I' V# e7 W版权声明:本文为CSDN博主「一点一滴成长」的原创文章,遵循CC 4.0 BY-SA版权协议,转载请附上原文出处链接及本声明。2 N7 h( h4 s4 z$ i1 `3 w
原文链接:https://blog.csdn.net/qq_39946015/article/details/127351920 |
|