|
|
报错信息:
3 n9 I/ b3 o) {: t+ l```bash- h7 O$ `5 \. s8 M
gyp ERR! find VS
: a2 K, n& c- U6 B9 N* }; sgyp ERR! find VS msvs_version not set from command line or npm config4 x4 Z3 V* g* v1 R& i
gyp ERR! find VS running in VS Command Prompt, installation path is:
8 [4 o: A- x' Q$ y, C# R3 J3 @( w3 lgyp ERR! find VS "C:\Program Files (x86)\Microsoft Visual Studio\2017"; i# s$ i( [6 ]9 @
gyp ERR! find VS - will only use this version7 g. X( Q" F2 n; Z
gyp ERR! find VS could not use PowerShell to find Visual Studio 2017 or newer
$ R4 {, Z9 W' i C+ Y+ s0 pgyp ERR! find VS looking for Visual Studio 20155 e0 \, t# ^1 Y# @) b# |! w& g
gyp ERR! find VS - not found
0 Z& _2 i8 z' K7 A! Xgyp ERR! find VS looking for Visual Studio 2013, s' `0 [% O1 E+ e& d t7 e1 K& C5 s* P
gyp ERR! find VS - not found# H# @/ q) D8 l3 Q
gyp ERR! find VS
! C4 `- a" l5 H/ Bgyp ERR! find VS **************************************************************$ X2 O, K- I" r) j: E: l
gyp ERR! find VS You need to install the latest version of Visual Studio
% @0 `- Z( {, A* W' M! x! xgyp ERR! find VS including the "Desktop development with C++" workload.$ ]+ R, y4 Z0 z- w; Q+ T0 P& [
gyp ERR! find VS For more information consult the documentation at:
6 r; U+ ]$ x' L3 h Jgyp ERR! find VS https://github.com/nodejs/node-gyp#on-windows) x- A! [& |3 s) \
gyp ERR! find VS **************************************************************0 d2 ]5 |4 N0 A, S
gyp ERR! find VS- U: t( j, p9 C! u: C( f9 ^8 q
gyp ERR! configure error
. v% ]! R. G8 u5 v& Bgyp ERR! stack Error: Could not find any Visual Studio installation to use
, @" E3 R/ t5 b* W* T% |8 _gyp ERR! stack at VisualStudioFinder.fail (D:\rymcu\electron-serialport\node_modules\node-gyp\lib\find-visualstu8 e6 o4 g5 {0 d# ~$ m$ z
dio.js:121:47)6 [. _: f1 i: B& I! a
gyp ERR! stack at D:\rymcu\electron-serialport\node_modules\node-gyp\lib\find-visualstudio.js:74:16
& r& G! s0 O2 G5 g. }! ugyp ERR! stack at D:\rymcu\electron-serialport\node_modules\node-gyp\lib\find-visualstudio.js:372:166 C0 m/ T1 i! ` `# V1 R/ q
gyp ERR! stack at D:\rymcu\electron-serialport\node_modules\node-gyp\lib\util.js:54:7+ W& ~( y. N6 ]
gyp ERR! stack at D:\rymcu\electron-serialport\node_modules\node-gyp\lib\util.js:33:16 \( L% w; X# H9 \ P. k
gyp ERR! stack at ChildProcess.exithandler (child_process.js:310:5)9 h( K9 ~* m- P5 p' f6 a
gyp ERR! stack at ChildProcess.emit (events.js:315:20)
m' K4 U2 Q4 f1 ]5 s7 rgyp ERR! stack at maybeClose (internal/child_process.js:1021:16)
# k1 f% r( `6 m! Lgyp ERR! stack at Process.ChildProcess._handle.onexit (internal/child_process.js:286:5)( f/ b# z& R) m4 [( i. M& F% O
gyp ERR! System Windows_NT 10.0.15063 3 ]- b. S1 i1 R6 i
, d: ^' M0 Q. _0 z+ L% p
解决办法
P6 d% M" t7 g; y+ w1 L1、卸载nodejs重新安装一遍3 g% H6 v5 k, O% I2 \' N
, @1 I2 E6 t1 U8 h! ~# \, z D2、设置淘宝镜像 npm config set registry https://registry.npm.taobao.org7 u9 {5 {3 z5 x+ Z" h+ A
0 A. |5 f1 v. J( {1 A" T3、安装nodejs所需的环境(Visual Studio XX、python什么鬼的),执行这个命令会自动检测并帮你安装好,npm install --g --production windows-build-tools- |+ z. [! u2 l/ n; W2 y9 ]% y3 O
————————————————
1 F& n/ ]3 ^+ c2 y q6 D) a! A版权声明:本文为CSDN博主「一点一滴成长」的原创文章,遵循CC 4.0 BY-SA版权协议,转载请附上原文出处链接及本声明。
# R: u' j3 `' L; m4 r X. @+ W+ B原文链接:https://blog.csdn.net/qq_39946015/article/details/127351920 |
|