|
|
报错信息:) X$ k: F3 L# g0 K0 c
```bash& m+ v; F* f/ ]' f5 Y
gyp ERR! find VS4 j) A: d6 P: v) y" a ^3 g/ G6 i
gyp ERR! find VS msvs_version not set from command line or npm config
( w3 Z5 k+ ^* `% `5 |gyp ERR! find VS running in VS Command Prompt, installation path is:
" G1 b* M0 a: K1 n9 H5 L$ T3 M" Zgyp ERR! find VS "C:\Program Files (x86)\Microsoft Visual Studio\2017"7 p5 Y9 |, L. k, R! v! F3 R V( }
gyp ERR! find VS - will only use this version
0 u* Q6 K1 Z6 _% P; r0 ?" E& [6 tgyp ERR! find VS could not use PowerShell to find Visual Studio 2017 or newer
( e+ G, v1 K7 X* G) g0 ugyp ERR! find VS looking for Visual Studio 2015
6 l, O/ ]4 f8 m, B% \$ Agyp ERR! find VS - not found; y* I9 ~" J7 j2 A
gyp ERR! find VS looking for Visual Studio 20133 u% }: k: M7 \& A, r
gyp ERR! find VS - not found7 J' _, N( ^$ U" ~' J$ S
gyp ERR! find VS
: P/ i7 p- i! \( O+ z! s- w! ^gyp ERR! find VS **************************************************************
4 l: V8 B, Y; ^gyp ERR! find VS You need to install the latest version of Visual Studio! d$ F3 C, _* ]7 c" d3 W
gyp ERR! find VS including the "Desktop development with C++" workload.
6 z. V1 n" _6 N+ f+ \% r. Dgyp ERR! find VS For more information consult the documentation at:
3 @0 }( B) i, J, Dgyp ERR! find VS https://github.com/nodejs/node-gyp#on-windows
8 N+ U1 n# r, |( d3 Cgyp ERR! find VS **************************************************************2 x! V, i' _$ q8 @8 g7 Q. n
gyp ERR! find VS& w. S# Y, k, G
gyp ERR! configure error) [2 Y" ^0 u8 E1 _1 w
gyp ERR! stack Error: Could not find any Visual Studio installation to use9 a( q' P0 o" ?" M. ^2 _
gyp ERR! stack at VisualStudioFinder.fail (D:\rymcu\electron-serialport\node_modules\node-gyp\lib\find-visualstu5 a9 ]4 E. b% a! k. U2 W
dio.js:121:47)5 l1 R+ I+ Q" H, w2 \. v. t
gyp ERR! stack at D:\rymcu\electron-serialport\node_modules\node-gyp\lib\find-visualstudio.js:74:16
5 H8 X9 w0 t% l+ F1 v$ bgyp ERR! stack at D:\rymcu\electron-serialport\node_modules\node-gyp\lib\find-visualstudio.js:372:16
2 l8 B: w$ j6 h/ u9 m/ r' Xgyp ERR! stack at D:\rymcu\electron-serialport\node_modules\node-gyp\lib\util.js:54:78 m ?4 }4 V' z- I9 l
gyp ERR! stack at D:\rymcu\electron-serialport\node_modules\node-gyp\lib\util.js:33:16
2 }9 ` `0 S, Igyp ERR! stack at ChildProcess.exithandler (child_process.js:310:5)
: x4 L7 p! O5 `5 Y' W: _9 C# r) a% kgyp ERR! stack at ChildProcess.emit (events.js:315:20)
# N5 Z, n) h) W0 m7 {5 }gyp ERR! stack at maybeClose (internal/child_process.js:1021:16)+ o) ~7 f1 ]! S' ~
gyp ERR! stack at Process.ChildProcess._handle.onexit (internal/child_process.js:286:5)
+ y9 m* n" J" n: j2 z8 s9 vgyp ERR! System Windows_NT 10.0.15063
* e W7 |4 r# _% a8 {7 A( `+ g/ y+ L6 k) \$ H+ M( |4 q( _/ b# q2 g
解决办法
( `+ M; q( z. K' k) H7 K! H& L C' S0 L1、卸载nodejs重新安装一遍
) A* P! a: u6 d' e
6 y3 }) `. q% ?. s# e, S/ u% a2、设置淘宝镜像 npm config set registry https://registry.npm.taobao.org
* f9 ?7 S) G7 V* {; @$ K% B0 p& p; B8 U
3、安装nodejs所需的环境(Visual Studio XX、python什么鬼的),执行这个命令会自动检测并帮你安装好,npm install --g --production windows-build-tools
. }% T6 t% y: A" @" K0 ?$ L————————————————# Q* B# ?$ i( w4 B# n9 j6 U
版权声明:本文为CSDN博主「一点一滴成长」的原创文章,遵循CC 4.0 BY-SA版权协议,转载请附上原文出处链接及本声明。
' {! z) U3 M. j9 r2 k原文链接:https://blog.csdn.net/qq_39946015/article/details/127351920 |
|