|
|
报错信息:( h: v: n2 [, T4 q6 U, x
```bash
, W9 h7 c- _$ w: D0 d* a1 P# t& v+ agyp ERR! find VS
) @& O; ?- y8 Z) C1 x; M) R" igyp ERR! find VS msvs_version not set from command line or npm config
9 J: x* d1 h8 N/ Tgyp ERR! find VS running in VS Command Prompt, installation path is:) A& e6 H& ?" `$ b9 w+ U
gyp ERR! find VS "C:\Program Files (x86)\Microsoft Visual Studio\2017"; s8 g2 @$ j4 }& f: U# n7 ?7 j
gyp ERR! find VS - will only use this version9 M. t I$ q# a6 E, G9 F$ G! H% S
gyp ERR! find VS could not use PowerShell to find Visual Studio 2017 or newer3 l* e+ H2 q% E
gyp ERR! find VS looking for Visual Studio 2015
, Y- }( M: p# P* @6 E" |gyp ERR! find VS - not found9 |: F, f" [. z3 ]
gyp ERR! find VS looking for Visual Studio 2013
/ H4 |/ Q, e. O: v, Q: h W$ tgyp ERR! find VS - not found' }$ v5 O+ X; f) j
gyp ERR! find VS/ ?) q( @+ m( O. W$ |
gyp ERR! find VS **************************************************************3 F5 J* O# J6 P& s( L
gyp ERR! find VS You need to install the latest version of Visual Studio
. m( n7 } k t' z, u; h O! Fgyp ERR! find VS including the "Desktop development with C++" workload.
7 z. A3 u6 }( b# Z5 egyp ERR! find VS For more information consult the documentation at:0 h- a, G. y; E. O* n( U) F9 L) l
gyp ERR! find VS https://github.com/nodejs/node-gyp#on-windows+ O) ~. X, e7 _ ?, B' @/ L; m _8 y1 r4 Y
gyp ERR! find VS **************************************************************
% B4 V* a: X4 L: r% X6 o4 a3 ]gyp ERR! find VS
# u& { t& ]/ k ~; B$ ~' mgyp ERR! configure error9 Z- A$ M! x, x8 c8 x1 E+ E( [% n
gyp ERR! stack Error: Could not find any Visual Studio installation to use
/ I! J3 }0 X1 R8 Z$ V! N% Agyp ERR! stack at VisualStudioFinder.fail (D:\rymcu\electron-serialport\node_modules\node-gyp\lib\find-visualstu
) R* @9 ~& O5 J5 D3 Jdio.js:121:47)
1 C( T- J" K0 i$ p y" Jgyp ERR! stack at D:\rymcu\electron-serialport\node_modules\node-gyp\lib\find-visualstudio.js:74:16 M; i; ]( j1 c# Q! r4 j
gyp ERR! stack at D:\rymcu\electron-serialport\node_modules\node-gyp\lib\find-visualstudio.js:372:16- S7 b0 c# ^5 ~9 r g, X* ]
gyp ERR! stack at D:\rymcu\electron-serialport\node_modules\node-gyp\lib\util.js:54:7
5 ?' O1 @0 y( c" z) w" Dgyp ERR! stack at D:\rymcu\electron-serialport\node_modules\node-gyp\lib\util.js:33:16* |5 S/ y$ q7 W. N0 D* }
gyp ERR! stack at ChildProcess.exithandler (child_process.js:310:5)7 N; `; {/ _0 u1 s7 Q/ v
gyp ERR! stack at ChildProcess.emit (events.js:315:20)
5 e2 }# P: h1 a S4 k. ~9 t$ fgyp ERR! stack at maybeClose (internal/child_process.js:1021:16)" w0 v4 a+ ]( R8 c/ l! \9 Q1 x
gyp ERR! stack at Process.ChildProcess._handle.onexit (internal/child_process.js:286:5)$ b5 }( m! \4 a0 P4 g
gyp ERR! System Windows_NT 10.0.15063 2 q. i) `, t% \7 _# j, r2 y8 W
9 `( W$ l/ w/ |
解决办法3 F+ e$ R' R# W$ |. O
1、卸载nodejs重新安装一遍2 k* X3 {+ [1 o/ ^$ y4 Q
~# U/ ~7 x l& |2、设置淘宝镜像 npm config set registry https://registry.npm.taobao.org0 ]' q: F2 D# j, l" W8 G( h: z
% ` t9 G% g2 K8 r% |) g3、安装nodejs所需的环境(Visual Studio XX、python什么鬼的),执行这个命令会自动检测并帮你安装好,npm install --g --production windows-build-tools
6 v! \. M0 i% |: h- u) h n7 Q5 K————————————————" h y. P7 M, X ?
版权声明:本文为CSDN博主「一点一滴成长」的原创文章,遵循CC 4.0 BY-SA版权协议,转载请附上原文出处链接及本声明。
8 p7 L5 ?1 s2 e$ a1 d1 k$ F# o原文链接:https://blog.csdn.net/qq_39946015/article/details/127351920 |
|