|
|
报错信息:) g k0 D% b" c: W
```bash5 d- G X7 M4 V) ]: u# S+ N" u
gyp ERR! find VS- x: r" O, n2 L/ B/ Z" ]. N. h. O
gyp ERR! find VS msvs_version not set from command line or npm config3 i- K& r: L5 u6 Q0 V
gyp ERR! find VS running in VS Command Prompt, installation path is:
. h6 D% J( }8 i+ t2 i0 d1 hgyp ERR! find VS "C:\Program Files (x86)\Microsoft Visual Studio\2017"
5 J+ u$ w6 s; \ f$ N8 i6 f H+ Xgyp ERR! find VS - will only use this version
7 A/ _/ x$ s" [& f8 Qgyp ERR! find VS could not use PowerShell to find Visual Studio 2017 or newer
( j0 o& r7 Q" p9 k- F3 Tgyp ERR! find VS looking for Visual Studio 2015
( A4 x% P( _7 A0 M' X ]gyp ERR! find VS - not found
& d' L- D2 C! I+ u+ Kgyp ERR! find VS looking for Visual Studio 2013, ^" e2 X1 m' S/ J2 ~
gyp ERR! find VS - not found$ N+ m, E. {8 T- I: y$ k3 N
gyp ERR! find VS: F/ v3 K: K, X W- s9 x
gyp ERR! find VS **************************************************************1 N2 J D7 W8 W# ?* \3 y
gyp ERR! find VS You need to install the latest version of Visual Studio
, K3 u& D3 d1 I7 y$ ]5 l6 rgyp ERR! find VS including the "Desktop development with C++" workload.. J* b: c5 o& l N
gyp ERR! find VS For more information consult the documentation at:2 l9 P5 s2 a; _2 ^9 s- ^1 g3 t
gyp ERR! find VS https://github.com/nodejs/node-gyp#on-windows0 C/ X* z+ W( A) v) I8 Q, k7 H; t
gyp ERR! find VS ************************************************************** ]+ W9 i" e+ m3 G* V' S: ?- d
gyp ERR! find VS
5 F( S. V1 Q1 {# s* o' fgyp ERR! configure error. O1 O, n% O6 K6 y+ T, Y
gyp ERR! stack Error: Could not find any Visual Studio installation to use
% d% W1 d' U& Z& j% `gyp ERR! stack at VisualStudioFinder.fail (D:\rymcu\electron-serialport\node_modules\node-gyp\lib\find-visualstu, L5 k n% @ w& Q( |% Q0 m
dio.js:121:47)
R s/ r/ Q* w, K6 w& S' \gyp ERR! stack at D:\rymcu\electron-serialport\node_modules\node-gyp\lib\find-visualstudio.js:74:16$ C% R4 F f8 H4 ~
gyp ERR! stack at D:\rymcu\electron-serialport\node_modules\node-gyp\lib\find-visualstudio.js:372:161 U; q% f8 B, z. ~2 I
gyp ERR! stack at D:\rymcu\electron-serialport\node_modules\node-gyp\lib\util.js:54:7
- ]1 p5 |, H* C1 W- ~; Agyp ERR! stack at D:\rymcu\electron-serialport\node_modules\node-gyp\lib\util.js:33:16" C* P) I: ^7 c1 c# L( o- Y8 M
gyp ERR! stack at ChildProcess.exithandler (child_process.js:310:5)# x9 i$ M2 Q; @4 e
gyp ERR! stack at ChildProcess.emit (events.js:315:20)
& E J& D/ z5 m8 T/ qgyp ERR! stack at maybeClose (internal/child_process.js:1021:16)( z; P" C6 r9 y( D' Q0 K
gyp ERR! stack at Process.ChildProcess._handle.onexit (internal/child_process.js:286:5)/ R0 L' `4 l# y- {6 `
gyp ERR! System Windows_NT 10.0.15063
: o4 K; _/ H0 @! N. H" [; a# `
L* Y9 a' ^" _! P' a解决办法
; Z8 f- U c u* @" r; ~1 C1、卸载nodejs重新安装一遍
4 q: R: o% X+ Z; p
+ W+ m8 C% i' ^) x2、设置淘宝镜像 npm config set registry https://registry.npm.taobao.org
% c" t" S3 i$ P$ |; @: b* K: }( P. e/ i4 Z
3、安装nodejs所需的环境(Visual Studio XX、python什么鬼的),执行这个命令会自动检测并帮你安装好,npm install --g --production windows-build-tools
% C- A* o o% e$ e1 Y————————————————5 t1 l! @. \ u* E4 p
版权声明:本文为CSDN博主「一点一滴成长」的原创文章,遵循CC 4.0 BY-SA版权协议,转载请附上原文出处链接及本声明。* q, i; m+ K' M x F) _* k
原文链接:https://blog.csdn.net/qq_39946015/article/details/127351920 |
|