|
|
报错信息:3 ?. V7 Q8 a4 N8 P4 P/ l, C
```bash
7 n$ I P8 u8 a: \5 L. n* tgyp ERR! find VS
1 J) T8 i u) F. \5 ^$ }0 W3 kgyp ERR! find VS msvs_version not set from command line or npm config% I) g( X% p2 @& Q) l
gyp ERR! find VS running in VS Command Prompt, installation path is:, e7 v" B) r" h5 ]* e4 B4 |% z
gyp ERR! find VS "C:\Program Files (x86)\Microsoft Visual Studio\2017"
- z6 g6 s& I, Qgyp ERR! find VS - will only use this version. C5 j9 W0 [ Q! C
gyp ERR! find VS could not use PowerShell to find Visual Studio 2017 or newer, p- c, l& i2 K6 T, [
gyp ERR! find VS looking for Visual Studio 2015
, h8 R' f: O& g0 v; N- |3 `* |) lgyp ERR! find VS - not found
/ ]3 V: O% Q6 H1 [- A- u4 }gyp ERR! find VS looking for Visual Studio 2013' G ~5 I; d e, |) Q) ?$ ^) J
gyp ERR! find VS - not found) e }: B" t+ Y* c5 i) _3 \
gyp ERR! find VS
1 N% [; F" y* G4 Q5 Zgyp ERR! find VS **************************************************************
- Q" m8 G8 B# q) X0 X6 }* t7 [gyp ERR! find VS You need to install the latest version of Visual Studio
; ^# H2 z% u: ^* ~gyp ERR! find VS including the "Desktop development with C++" workload.
4 m5 P9 v4 N6 Tgyp ERR! find VS For more information consult the documentation at:& @0 W$ ]7 ?8 r
gyp ERR! find VS https://github.com/nodejs/node-gyp#on-windows9 D/ P9 J$ ] i# H
gyp ERR! find VS **************************************************************
5 l' j& b ?! p! ^: Y( X! U5 wgyp ERR! find VS
+ n9 k* ^2 E) o7 Tgyp ERR! configure error) ^- z) [* a& o% q% D- _( R" z6 B
gyp ERR! stack Error: Could not find any Visual Studio installation to use
, d' {3 z; [" @! ygyp ERR! stack at VisualStudioFinder.fail (D:\rymcu\electron-serialport\node_modules\node-gyp\lib\find-visualstu
+ n! x& s8 S" I4 g5 S' ~dio.js:121:47)* T* L3 h" H" M: X6 J$ [9 H2 z9 @
gyp ERR! stack at D:\rymcu\electron-serialport\node_modules\node-gyp\lib\find-visualstudio.js:74:16) W! X# s2 a5 j
gyp ERR! stack at D:\rymcu\electron-serialport\node_modules\node-gyp\lib\find-visualstudio.js:372:16
* p" }8 G( c) b2 B. Mgyp ERR! stack at D:\rymcu\electron-serialport\node_modules\node-gyp\lib\util.js:54:7
# Q8 F& b1 @& w8 P4 Ugyp ERR! stack at D:\rymcu\electron-serialport\node_modules\node-gyp\lib\util.js:33:16
: e; A$ Y2 ?" Ygyp ERR! stack at ChildProcess.exithandler (child_process.js:310:5)
) W: I0 a5 s8 z3 d4 A( ygyp ERR! stack at ChildProcess.emit (events.js:315:20)- t x* t+ m6 [/ N0 C3 ~" p# d$ q/ c
gyp ERR! stack at maybeClose (internal/child_process.js:1021:16): x7 W" g0 }. o% O
gyp ERR! stack at Process.ChildProcess._handle.onexit (internal/child_process.js:286:5)9 N3 c$ n* r* t; t8 u
gyp ERR! System Windows_NT 10.0.15063
0 |' d' H1 [# F9 c: t. \" A% J0 _: H" t# P; e' F# o
解决办法
9 _" k+ z9 K8 }, X# P1、卸载nodejs重新安装一遍; }' K$ v1 t, v& R# Y! l
' n0 `1 g5 P/ e; O9 v2 w
2、设置淘宝镜像 npm config set registry https://registry.npm.taobao.org* X, g% A, H @; j3 z* V& m% g7 J
" c( S; z% s$ p1 [! O- v
3、安装nodejs所需的环境(Visual Studio XX、python什么鬼的),执行这个命令会自动检测并帮你安装好,npm install --g --production windows-build-tools' X4 e# o' }/ Q$ u: ?, o
————————————————
9 ~3 M) @% ]. b# @) L版权声明:本文为CSDN博主「一点一滴成长」的原创文章,遵循CC 4.0 BY-SA版权协议,转载请附上原文出处链接及本声明。
# Z/ l1 Y; _2 r1 s1 ^7 S原文链接:https://blog.csdn.net/qq_39946015/article/details/127351920 |
|