|
|
报错信息:
/ [9 z6 M* k6 O4 v& ~ T% P```bash
! y8 ]) \4 A+ C% ~6 l* T* kgyp ERR! find VS
# x+ Q- h' z U& K( U" q( D, dgyp ERR! find VS msvs_version not set from command line or npm config0 F: Z6 l8 W0 r. ` |: @0 u8 K4 z1 z
gyp ERR! find VS running in VS Command Prompt, installation path is:( V! c$ D& ~2 q/ E
gyp ERR! find VS "C:\Program Files (x86)\Microsoft Visual Studio\2017"
, \* f9 u* s" c7 \gyp ERR! find VS - will only use this version$ R. k$ k* [* N& m1 w, g
gyp ERR! find VS could not use PowerShell to find Visual Studio 2017 or newer
6 _* x% |: p, \gyp ERR! find VS looking for Visual Studio 20152 B# F" C: X, ]: }8 u
gyp ERR! find VS - not found* c6 \" Q# U) Y" ?6 N
gyp ERR! find VS looking for Visual Studio 20136 S" y+ M/ ]" h+ [
gyp ERR! find VS - not found
7 Y- T' `% v$ m% y; w2 Kgyp ERR! find VS( t* t/ A3 {; S7 H( E$ S1 y: R5 W
gyp ERR! find VS **************************************************************
0 @, ]( c: B$ Tgyp ERR! find VS You need to install the latest version of Visual Studio
9 \) s* h8 g/ r5 ogyp ERR! find VS including the "Desktop development with C++" workload.
s% t- V2 Q$ |. Zgyp ERR! find VS For more information consult the documentation at:1 H: D/ h: A5 V: @
gyp ERR! find VS https://github.com/nodejs/node-gyp#on-windows
* f# f8 s6 y/ {2 ?gyp ERR! find VS **************************************************************
( r: G% |) w& f7 n$ `2 V. r& ugyp ERR! find VS1 l, L/ D9 N. m( b
gyp ERR! configure error
& O$ p) n3 I1 c1 b* r( g2 {gyp ERR! stack Error: Could not find any Visual Studio installation to use
/ |( R- c0 H6 W+ vgyp ERR! stack at VisualStudioFinder.fail (D:\rymcu\electron-serialport\node_modules\node-gyp\lib\find-visualstu9 t# F% @& a; Y
dio.js:121:47)
& ?# n2 r- H1 _- x) z1 q1 M0 ^/ h7 lgyp ERR! stack at D:\rymcu\electron-serialport\node_modules\node-gyp\lib\find-visualstudio.js:74:16
6 X6 S6 [# C% x$ {' ^0 J4 W- ygyp ERR! stack at D:\rymcu\electron-serialport\node_modules\node-gyp\lib\find-visualstudio.js:372:16
' o; B. }$ T" p" N+ Q8 |3 P5 B4 Ggyp ERR! stack at D:\rymcu\electron-serialport\node_modules\node-gyp\lib\util.js:54:7
5 d2 x' \4 a1 k1 u. mgyp ERR! stack at D:\rymcu\electron-serialport\node_modules\node-gyp\lib\util.js:33:16
: B% Y( k, I5 t& F4 lgyp ERR! stack at ChildProcess.exithandler (child_process.js:310:5)
; y( }1 t/ o# N+ u* q$ [gyp ERR! stack at ChildProcess.emit (events.js:315:20)( y. J) o% n. J3 X" X L
gyp ERR! stack at maybeClose (internal/child_process.js:1021:16), m0 b6 R1 _4 P! E% S
gyp ERR! stack at Process.ChildProcess._handle.onexit (internal/child_process.js:286:5)9 f/ x1 d" \& o: ?
gyp ERR! System Windows_NT 10.0.15063 : B9 K: c4 o' ~1 L
& b( T) n) H4 @$ U; Z
解决办法
+ O4 j* _ c. h" v: c" v4 }2 E1、卸载nodejs重新安装一遍/ \8 y& o( X8 r$ d1 j9 ^: y
3 B% V* p- A. ] |
2、设置淘宝镜像 npm config set registry https://registry.npm.taobao.org0 b# t4 i" Z3 }
7 }7 i9 J$ z4 I# Y$ F3、安装nodejs所需的环境(Visual Studio XX、python什么鬼的),执行这个命令会自动检测并帮你安装好,npm install --g --production windows-build-tools
5 X% s* K0 V4 t4 n. S( ?& T0 D1 R9 j————————————————
6 J7 N$ i, E0 H- u版权声明:本文为CSDN博主「一点一滴成长」的原创文章,遵循CC 4.0 BY-SA版权协议,转载请附上原文出处链接及本声明。1 d, a4 u" m, A$ B) m* q6 z
原文链接:https://blog.csdn.net/qq_39946015/article/details/127351920 |
|