|
|
报错信息:# n& ]' q: C* C0 W
```bash( j# p$ {! C" K; U- M
gyp ERR! find VS
% O, m" H* O9 i/ C# v6 Cgyp ERR! find VS msvs_version not set from command line or npm config
/ I4 j# q5 a8 b D9 Cgyp ERR! find VS running in VS Command Prompt, installation path is:5 ^0 u& {/ h3 w0 X( |, F' ]( P9 a
gyp ERR! find VS "C:\Program Files (x86)\Microsoft Visual Studio\2017"
6 q C4 u* Z+ Y! p. z9 @gyp ERR! find VS - will only use this version8 a, m7 A$ L# |. K
gyp ERR! find VS could not use PowerShell to find Visual Studio 2017 or newer4 J3 `8 ^1 Z3 Y5 p2 Z8 O
gyp ERR! find VS looking for Visual Studio 2015* g5 C4 l$ h) J, y
gyp ERR! find VS - not found2 U. l# S6 b1 a; o
gyp ERR! find VS looking for Visual Studio 2013
& B5 G6 A8 {' E" r0 R* l+ Pgyp ERR! find VS - not found! n$ O( Y. k {) L
gyp ERR! find VS
- B& ~( J) S' U- }/ x) K& Agyp ERR! find VS **************************************************************
( Z+ p/ k4 _% W" z4 ^ j; xgyp ERR! find VS You need to install the latest version of Visual Studio
$ c. b0 f* E7 c5 a. Zgyp ERR! find VS including the "Desktop development with C++" workload.
+ _, I1 O' A, ?+ V, Hgyp ERR! find VS For more information consult the documentation at:% o0 V7 M) i5 W% E( n9 P
gyp ERR! find VS https://github.com/nodejs/node-gyp#on-windows
2 M: f8 _+ _3 O" u9 D% D: ?; c; Ogyp ERR! find VS **************************************************************
2 C1 N0 j6 a) y2 kgyp ERR! find VS
" ~0 ?& o9 a4 v4 d% T5 I0 C3 Kgyp ERR! configure error
% V8 M3 ?# v) n+ e6 Igyp ERR! stack Error: Could not find any Visual Studio installation to use
# S/ J! \* z3 ~" Tgyp ERR! stack at VisualStudioFinder.fail (D:\rymcu\electron-serialport\node_modules\node-gyp\lib\find-visualstu7 M" ?0 Q$ y8 Y! c) B7 a
dio.js:121:47)
$ n: b2 B$ e' pgyp ERR! stack at D:\rymcu\electron-serialport\node_modules\node-gyp\lib\find-visualstudio.js:74:16) A9 |, D# J0 `* v' y, ^( R3 l
gyp ERR! stack at D:\rymcu\electron-serialport\node_modules\node-gyp\lib\find-visualstudio.js:372:161 ?& ^* D% Y8 P2 r! o( A% }. U3 R
gyp ERR! stack at D:\rymcu\electron-serialport\node_modules\node-gyp\lib\util.js:54:71 d; F/ D; z: w+ J2 V: `
gyp ERR! stack at D:\rymcu\electron-serialport\node_modules\node-gyp\lib\util.js:33:16, g- U1 s b& G
gyp ERR! stack at ChildProcess.exithandler (child_process.js:310:5), K: ?9 u- }7 r, C- C
gyp ERR! stack at ChildProcess.emit (events.js:315:20)
" ~) y8 y0 e6 igyp ERR! stack at maybeClose (internal/child_process.js:1021:16)8 ~- [5 d" D$ I/ J& ^* c
gyp ERR! stack at Process.ChildProcess._handle.onexit (internal/child_process.js:286:5)
9 u& C0 H5 F9 H0 h: Pgyp ERR! System Windows_NT 10.0.15063
. F' Q% X: f! g/ A: ?0 Q5 Z# h2 H7 k* b) }
解决办法
: D/ R( N+ W1 w) s3 r* }/ u1、卸载nodejs重新安装一遍
3 w z( o; k! z8 E2 b" ]6 L' G+ _. y2 N3 I
2、设置淘宝镜像 npm config set registry https://registry.npm.taobao.org
0 c. r0 ~7 V. z2 h2 j, L6 T' m: F9 P1 J! I" M ^( E
3、安装nodejs所需的环境(Visual Studio XX、python什么鬼的),执行这个命令会自动检测并帮你安装好,npm install --g --production windows-build-tools& [! C6 O% G, M" A& T" @
————————————————. d; w& W$ n+ D4 ^6 t
版权声明:本文为CSDN博主「一点一滴成长」的原创文章,遵循CC 4.0 BY-SA版权协议,转载请附上原文出处链接及本声明。
* M) u' C; k. B- R# ] B原文链接:https://blog.csdn.net/qq_39946015/article/details/127351920 |
|