|
|
报错信息:; m# h. ~+ S A8 k+ C1 k
```bash
7 y2 T2 X$ n- T& \. H# W J! D+ Qgyp ERR! find VS# a- v! v S4 f, \
gyp ERR! find VS msvs_version not set from command line or npm config. }5 u# @9 @8 J% l) ^
gyp ERR! find VS running in VS Command Prompt, installation path is:- |& {4 ~* p3 R: e$ ~$ x# K
gyp ERR! find VS "C:\Program Files (x86)\Microsoft Visual Studio\2017"2 b% D: J3 c8 _2 b) s+ y
gyp ERR! find VS - will only use this version
3 j4 P5 {' L/ r; [" igyp ERR! find VS could not use PowerShell to find Visual Studio 2017 or newer
% X' ^. I- _( l4 Agyp ERR! find VS looking for Visual Studio 2015- Q8 \: @6 u8 k! a- v6 N
gyp ERR! find VS - not found+ `3 D; k- h; J0 Q S
gyp ERR! find VS looking for Visual Studio 2013
$ R/ ]" P2 T8 i# ]6 Agyp ERR! find VS - not found
7 f. _6 b4 ?" q! A8 Ggyp ERR! find VS: |" b$ V/ O5 r3 @3 \( W1 U
gyp ERR! find VS **************************************************************
7 L( }* @. \3 @& e7 ^1 Ugyp ERR! find VS You need to install the latest version of Visual Studio
. k% ^& Q5 j8 V) a8 q! Z3 |, Kgyp ERR! find VS including the "Desktop development with C++" workload.0 _' V, V% _" q- f7 H1 Y5 T
gyp ERR! find VS For more information consult the documentation at:
+ r# d# Q) Z9 I2 Agyp ERR! find VS https://github.com/nodejs/node-gyp#on-windows
0 z, }1 E' ?! P6 Dgyp ERR! find VS **************************************************************/ `- P( x* w0 y+ y2 i
gyp ERR! find VS
6 }% E3 g( `9 v" p" L& Hgyp ERR! configure error$ e1 k1 m2 Z" m
gyp ERR! stack Error: Could not find any Visual Studio installation to use( |; P4 l3 P1 r' z
gyp ERR! stack at VisualStudioFinder.fail (D:\rymcu\electron-serialport\node_modules\node-gyp\lib\find-visualstu9 B6 ^1 V4 J! E+ E, _% p! r
dio.js:121:47)- ?4 p: i: j+ [6 x7 b; v% v% A& @) b
gyp ERR! stack at D:\rymcu\electron-serialport\node_modules\node-gyp\lib\find-visualstudio.js:74:16& }3 R* y; J* C! t& V, S* e
gyp ERR! stack at D:\rymcu\electron-serialport\node_modules\node-gyp\lib\find-visualstudio.js:372:16
+ h: g: i6 ~; u t7 ygyp ERR! stack at D:\rymcu\electron-serialport\node_modules\node-gyp\lib\util.js:54:7+ E0 m' w. _, ~& [+ C7 ?
gyp ERR! stack at D:\rymcu\electron-serialport\node_modules\node-gyp\lib\util.js:33:16, I- W6 X5 N8 v p
gyp ERR! stack at ChildProcess.exithandler (child_process.js:310:5)5 G) h0 r/ f- h; i. q0 }
gyp ERR! stack at ChildProcess.emit (events.js:315:20)
) j+ m; V2 E) T3 Ygyp ERR! stack at maybeClose (internal/child_process.js:1021:16)3 @# ~0 L4 Z9 u+ X; H6 c
gyp ERR! stack at Process.ChildProcess._handle.onexit (internal/child_process.js:286:5)
* A/ S0 ^, m7 A2 \ w, R: Lgyp ERR! System Windows_NT 10.0.15063 : A6 r) c% E/ A6 H6 a. a
& W7 \- T- D# @+ `
解决办法) t3 h5 y: V) M, `; u' V1 v+ j
1、卸载nodejs重新安装一遍 J4 Q7 k/ ]/ K) }: u6 G( K+ O
! o! f5 \5 _; T+ ~
2、设置淘宝镜像 npm config set registry https://registry.npm.taobao.org
- D; Z N( A6 e1 S& Z! A1 ^8 n( S! a6 N* {1 \4 ]# Y& f9 ^
3、安装nodejs所需的环境(Visual Studio XX、python什么鬼的),执行这个命令会自动检测并帮你安装好,npm install --g --production windows-build-tools
: f( q) c' W% ^9 v9 V————————————————- V% r- C( W. M' e
版权声明:本文为CSDN博主「一点一滴成长」的原创文章,遵循CC 4.0 BY-SA版权协议,转载请附上原文出处链接及本声明。4 e7 d n" M0 k% |2 c2 i8 F2 ]
原文链接:https://blog.csdn.net/qq_39946015/article/details/127351920 |
|