|
|
报错信息:; a. K ~" X* e9 K; y
```bash* H1 Q* b* y* j4 G" k! t
gyp ERR! find VS$ O: T+ R* y: u6 A" |# Z5 o
gyp ERR! find VS msvs_version not set from command line or npm config
7 \$ C& I! V/ `0 Q( u3 P/ igyp ERR! find VS running in VS Command Prompt, installation path is:$ y2 g5 ~; d8 H6 j
gyp ERR! find VS "C:\Program Files (x86)\Microsoft Visual Studio\2017"& |9 \ Z6 w/ t3 a
gyp ERR! find VS - will only use this version+ v8 t0 z# D5 S m
gyp ERR! find VS could not use PowerShell to find Visual Studio 2017 or newer3 U' A" h4 Y6 d
gyp ERR! find VS looking for Visual Studio 2015
% L# p6 p# [& k% V1 g* x" ]9 Mgyp ERR! find VS - not found2 X( z- _! |& q0 J3 Y: F
gyp ERR! find VS looking for Visual Studio 2013. d" U% y2 I6 ~1 U" d( k$ A4 ]
gyp ERR! find VS - not found- ^6 `) T2 w+ L2 F
gyp ERR! find VS
( h s" E+ M+ s3 ggyp ERR! find VS **************************************************************( B& I& @) i. M
gyp ERR! find VS You need to install the latest version of Visual Studio! X V0 e5 i$ o
gyp ERR! find VS including the "Desktop development with C++" workload.
; B' N4 c. J V* Cgyp ERR! find VS For more information consult the documentation at:
) V1 S, u2 g, t3 \gyp ERR! find VS https://github.com/nodejs/node-gyp#on-windows
) f8 o: n5 M; b% Vgyp ERR! find VS **************************************************************9 Z) q3 }& f) d! o D' O9 V
gyp ERR! find VS
" S! R9 G! f! }4 {& v/ N' ^gyp ERR! configure error4 S! E- K$ O! ~2 ?% n% i
gyp ERR! stack Error: Could not find any Visual Studio installation to use
9 P: @7 k2 a1 V5 `# b. ^gyp ERR! stack at VisualStudioFinder.fail (D:\rymcu\electron-serialport\node_modules\node-gyp\lib\find-visualstu6 o5 H3 s6 m7 Y& y. Y1 F; m$ k
dio.js:121:47)' t+ @3 v' F2 G3 Z) V
gyp ERR! stack at D:\rymcu\electron-serialport\node_modules\node-gyp\lib\find-visualstudio.js:74:162 b% _8 d! j/ @
gyp ERR! stack at D:\rymcu\electron-serialport\node_modules\node-gyp\lib\find-visualstudio.js:372:16
2 o- B: k7 m7 T, b1 l# |gyp ERR! stack at D:\rymcu\electron-serialport\node_modules\node-gyp\lib\util.js:54:7* B8 r* s. Q/ z3 a1 l4 U0 f8 k( d
gyp ERR! stack at D:\rymcu\electron-serialport\node_modules\node-gyp\lib\util.js:33:169 C" E W( f! K% q* ?& j2 d$ w
gyp ERR! stack at ChildProcess.exithandler (child_process.js:310:5)
8 w) F" I: G7 M8 P/ k; Y y% bgyp ERR! stack at ChildProcess.emit (events.js:315:20)
: m3 ?0 p7 y$ B9 f: hgyp ERR! stack at maybeClose (internal/child_process.js:1021:16), A# |7 a9 s1 v; {! R
gyp ERR! stack at Process.ChildProcess._handle.onexit (internal/child_process.js:286:5)
. O5 s7 O) H, R. D+ G2 H# xgyp ERR! System Windows_NT 10.0.15063 8 v$ s- @: H1 M6 d
! P0 d' t5 ?9 g5 V5 g- z2 w+ v, v
解决办法
9 P! H! C) f& X1、卸载nodejs重新安装一遍 C7 s$ m7 T9 x' m+ V9 P) u8 p
. S' P" T0 k7 ~8 _# o2 j2 ]
2、设置淘宝镜像 npm config set registry https://registry.npm.taobao.org/ k, b" `! L) r. ]" ?) H
5 G: T" C+ A3 D) C5 M% ]3 k3、安装nodejs所需的环境(Visual Studio XX、python什么鬼的),执行这个命令会自动检测并帮你安装好,npm install --g --production windows-build-tools; Q$ n" d* t6 p- @ o
————————————————/ ^9 K* T9 R& X
版权声明:本文为CSDN博主「一点一滴成长」的原创文章,遵循CC 4.0 BY-SA版权协议,转载请附上原文出处链接及本声明。
y" }8 o* o5 R1 j( A原文链接:https://blog.csdn.net/qq_39946015/article/details/127351920 |
|