|
|
报错信息:
& {+ k' r9 m m& q7 P9 X4 i3 ~```bash
$ H; y. i J S/ B0 ~gyp ERR! find VS9 f# @- L3 A: ]7 t" d9 U5 U- O2 F
gyp ERR! find VS msvs_version not set from command line or npm config
5 s6 b( Q8 W3 H$ }1 ugyp ERR! find VS running in VS Command Prompt, installation path is:0 o2 c9 \& d+ v" ^' |% z
gyp ERR! find VS "C:\Program Files (x86)\Microsoft Visual Studio\2017"
* k4 g" W5 T! F* @6 j( `gyp ERR! find VS - will only use this version
/ m Y6 ^% @3 Z7 A9 Rgyp ERR! find VS could not use PowerShell to find Visual Studio 2017 or newer
" E0 }, H) p V& hgyp ERR! find VS looking for Visual Studio 2015" q! n5 t7 H" j9 a& ]
gyp ERR! find VS - not found
2 Z/ h/ {1 R0 m: ]* D# kgyp ERR! find VS looking for Visual Studio 2013
: w5 G- {4 m- fgyp ERR! find VS - not found
) W, Y9 h9 ~* \+ M" i& p+ igyp ERR! find VS
5 b' r6 K' I; n9 N9 l% n1 Hgyp ERR! find VS **************************************************************1 f! k# S, A6 y5 k) ~
gyp ERR! find VS You need to install the latest version of Visual Studio( N X- J" I6 q, w! {6 D- ?
gyp ERR! find VS including the "Desktop development with C++" workload.. V4 A/ X/ C& ?7 A+ t$ j; x+ Y3 w
gyp ERR! find VS For more information consult the documentation at:
2 N, d; B# b& e2 Y2 _gyp ERR! find VS https://github.com/nodejs/node-gyp#on-windows
0 Y# l+ M L0 q2 r3 I4 lgyp ERR! find VS **************************************************************" ^8 k* ~9 \* O
gyp ERR! find VS
2 J* Q1 A1 k3 }gyp ERR! configure error
1 E @/ T7 \$ K3 Ugyp ERR! stack Error: Could not find any Visual Studio installation to use- F& Z' g( U9 ~7 x* i# ]
gyp ERR! stack at VisualStudioFinder.fail (D:\rymcu\electron-serialport\node_modules\node-gyp\lib\find-visualstu
; E8 I9 K4 E* j- L! Z4 M! ^+ Zdio.js:121:47)3 N; S- t6 ?( m6 d( P- Q
gyp ERR! stack at D:\rymcu\electron-serialport\node_modules\node-gyp\lib\find-visualstudio.js:74:16
2 `+ i a) L7 L) [! qgyp ERR! stack at D:\rymcu\electron-serialport\node_modules\node-gyp\lib\find-visualstudio.js:372:16
1 N& P; E- U/ B4 K3 [gyp ERR! stack at D:\rymcu\electron-serialport\node_modules\node-gyp\lib\util.js:54:7
+ X$ C1 N: A, N/ v* r$ Ggyp ERR! stack at D:\rymcu\electron-serialport\node_modules\node-gyp\lib\util.js:33:169 j/ F) p* U, s
gyp ERR! stack at ChildProcess.exithandler (child_process.js:310:5)8 U& D* h) w" t
gyp ERR! stack at ChildProcess.emit (events.js:315:20)% f' i7 j; I/ h
gyp ERR! stack at maybeClose (internal/child_process.js:1021:16)
+ a! l4 u% I8 T8 c1 \gyp ERR! stack at Process.ChildProcess._handle.onexit (internal/child_process.js:286:5)* A; J+ \* u4 Q0 l2 ?. O5 }
gyp ERR! System Windows_NT 10.0.15063
& I% _# x4 l. `
7 I, u/ m) H9 i9 l: i/ f解决办法
/ `! y% B3 u0 G1、卸载nodejs重新安装一遍
( [4 U W- ?5 r* l0 R1 T& y1 S% g7 [% R+ W
2、设置淘宝镜像 npm config set registry https://registry.npm.taobao.org
4 ^& i f; D# k! C% G! z: D8 _; m; g
3、安装nodejs所需的环境(Visual Studio XX、python什么鬼的),执行这个命令会自动检测并帮你安装好,npm install --g --production windows-build-tools7 W+ c" W5 }4 R& H. u. j* |2 t( e
————————————————
* {. ~, e d: _7 i4 q g版权声明:本文为CSDN博主「一点一滴成长」的原创文章,遵循CC 4.0 BY-SA版权协议,转载请附上原文出处链接及本声明。 t! k S) o0 ^' U! Z! `
原文链接:https://blog.csdn.net/qq_39946015/article/details/127351920 |
|