|
|
报错信息:
2 r& a9 E( R( r4 Z5 ]```bash# v4 f% s2 L7 ]8 K
gyp ERR! find VS! S& s% K0 p! L2 V4 u6 N
gyp ERR! find VS msvs_version not set from command line or npm config, _6 n2 U6 B$ g* ]& ~- {2 g
gyp ERR! find VS running in VS Command Prompt, installation path is:0 {1 n6 l# T' S' k3 w& n) B/ t
gyp ERR! find VS "C:\Program Files (x86)\Microsoft Visual Studio\2017"2 v* T6 e% H6 ]5 ^
gyp ERR! find VS - will only use this version
& `( G$ Y. t i/ C% g' ~4 Kgyp ERR! find VS could not use PowerShell to find Visual Studio 2017 or newer
8 e2 M* S) `5 X" D8 l" E' h: Lgyp ERR! find VS looking for Visual Studio 2015; i7 q# }) r6 o
gyp ERR! find VS - not found
" k6 M8 f& P! o: D; H( ^gyp ERR! find VS looking for Visual Studio 2013- A) @9 F* w& y6 U
gyp ERR! find VS - not found4 ~* X0 w3 Q! j, G7 q: ^
gyp ERR! find VS4 b& U4 q1 m+ f. i$ G
gyp ERR! find VS **************************************************************
2 Q# ]4 J" t" Jgyp ERR! find VS You need to install the latest version of Visual Studio
* v0 Y) t2 q) f$ V" X+ O! Agyp ERR! find VS including the "Desktop development with C++" workload.
7 S) U4 J; E: jgyp ERR! find VS For more information consult the documentation at:3 i) v8 y( A5 t o$ T; n
gyp ERR! find VS https://github.com/nodejs/node-gyp#on-windows
: l3 { P2 ?% Xgyp ERR! find VS **************************************************************
2 r2 j5 X8 E! Q3 J% J- X# F$ Igyp ERR! find VS+ r0 ^8 C3 T; S: G+ S/ ~0 z
gyp ERR! configure error3 A( L) o* |+ y; s5 L/ y6 S, f( I
gyp ERR! stack Error: Could not find any Visual Studio installation to use
' d2 r$ H5 m( S1 q) |gyp ERR! stack at VisualStudioFinder.fail (D:\rymcu\electron-serialport\node_modules\node-gyp\lib\find-visualstu+ h9 j4 P6 @0 @, T6 b2 K" {
dio.js:121:47). u2 U4 H Y/ p9 o- [
gyp ERR! stack at D:\rymcu\electron-serialport\node_modules\node-gyp\lib\find-visualstudio.js:74:169 @" J7 {8 @$ i2 x" C. S& q
gyp ERR! stack at D:\rymcu\electron-serialport\node_modules\node-gyp\lib\find-visualstudio.js:372:16
* L- m; b+ @( ~+ g0 e" ]! Ggyp ERR! stack at D:\rymcu\electron-serialport\node_modules\node-gyp\lib\util.js:54:74 f5 h, B# T/ g5 U6 H2 {
gyp ERR! stack at D:\rymcu\electron-serialport\node_modules\node-gyp\lib\util.js:33:16
8 |! x5 e- Y- w$ Y* J _gyp ERR! stack at ChildProcess.exithandler (child_process.js:310:5)7 R. J$ f# j2 ~, W" M2 ~
gyp ERR! stack at ChildProcess.emit (events.js:315:20)
% z: M7 r. s& w d, S0 \4 \gyp ERR! stack at maybeClose (internal/child_process.js:1021:16)5 O2 q/ p& m F9 Z0 ]7 I
gyp ERR! stack at Process.ChildProcess._handle.onexit (internal/child_process.js:286:5)9 ^6 q" W; X, l7 m* @6 q& |
gyp ERR! System Windows_NT 10.0.15063
* L/ F# l) u1 N [2 i( L; g6 w' s. E! o, |, D; R& H6 t5 c
解决办法
- v. o( J9 _2 H2 r4 f& E1 g" }% [/ c1、卸载nodejs重新安装一遍; F/ P6 F8 M" y) t7 g. |
( N+ f+ I( S9 ]; D4 r2、设置淘宝镜像 npm config set registry https://registry.npm.taobao.org2 G* q3 X! m$ G6 _. s& \, m
# R- c4 y1 y3 |0 z) V
3、安装nodejs所需的环境(Visual Studio XX、python什么鬼的),执行这个命令会自动检测并帮你安装好,npm install --g --production windows-build-tools+ L4 f) {5 i9 O1 T
————————————————. O! s! M% B/ O
版权声明:本文为CSDN博主「一点一滴成长」的原创文章,遵循CC 4.0 BY-SA版权协议,转载请附上原文出处链接及本声明。: _/ C9 I' C! b% N# B
原文链接:https://blog.csdn.net/qq_39946015/article/details/127351920 |
|