|
|
报错信息:
% F; E6 p5 n( d8 T7 r" Z```bash9 F& N* Z. N s. k( o4 m7 G' F# }' |
gyp ERR! find VS
8 X& p0 U6 v! Z9 y; q! Agyp ERR! find VS msvs_version not set from command line or npm config; T- [! w. e# W" ]1 \
gyp ERR! find VS running in VS Command Prompt, installation path is:
( _% p7 o; ?" Y5 k% ~2 Agyp ERR! find VS "C:\Program Files (x86)\Microsoft Visual Studio\2017"
3 d8 A: X/ y' P: _gyp ERR! find VS - will only use this version
& P% R7 J R& T0 n) M& O0 s& Mgyp ERR! find VS could not use PowerShell to find Visual Studio 2017 or newer
9 O" k6 k+ L* ?5 x7 p: ]gyp ERR! find VS looking for Visual Studio 2015
* E3 X4 } X# d: H* N3 X5 _gyp ERR! find VS - not found: z& E& T1 @: y! s$ b
gyp ERR! find VS looking for Visual Studio 2013' L) ]) |. I2 N `/ m4 K
gyp ERR! find VS - not found
7 s: t( U- W5 _/ y6 Q9 Sgyp ERR! find VS
% ^6 k# n' _7 ]- r! M. f6 Mgyp ERR! find VS **************************************************************
; G9 K+ T1 Z3 R3 o- o9 Q- Wgyp ERR! find VS You need to install the latest version of Visual Studio8 Y' M; K: N* ~5 Q
gyp ERR! find VS including the "Desktop development with C++" workload.
: d' @0 f( T" |' ^$ b3 v/ D! P4 [gyp ERR! find VS For more information consult the documentation at: [- ]6 |7 H6 l
gyp ERR! find VS https://github.com/nodejs/node-gyp#on-windows! I/ O2 F$ R1 l
gyp ERR! find VS **************************************************************
& U" U/ Y& c4 X( i$ [0 ~5 Wgyp ERR! find VS
; [$ G. s W& \9 G agyp ERR! configure error
2 z1 }+ F8 m" `gyp ERR! stack Error: Could not find any Visual Studio installation to use
! G3 L- O$ U8 W* L0 V7 w: V5 ~gyp ERR! stack at VisualStudioFinder.fail (D:\rymcu\electron-serialport\node_modules\node-gyp\lib\find-visualstu
7 ]+ @9 A9 U zdio.js:121:47), O9 ?% Q2 W+ {7 {0 x+ Z
gyp ERR! stack at D:\rymcu\electron-serialport\node_modules\node-gyp\lib\find-visualstudio.js:74:16
0 E& f( A4 m6 sgyp ERR! stack at D:\rymcu\electron-serialport\node_modules\node-gyp\lib\find-visualstudio.js:372:16
4 v; ?3 U, H8 S; H" _/ z% ` }4 y' egyp ERR! stack at D:\rymcu\electron-serialport\node_modules\node-gyp\lib\util.js:54:7
( c. Z0 V1 @ |( x1 O9 ]) Zgyp ERR! stack at D:\rymcu\electron-serialport\node_modules\node-gyp\lib\util.js:33:16
; G) ^$ T4 i9 w0 t0 T; c+ z Hgyp ERR! stack at ChildProcess.exithandler (child_process.js:310:5)+ Y! R# p8 k6 ]6 ?
gyp ERR! stack at ChildProcess.emit (events.js:315:20) t; ` R* P. M
gyp ERR! stack at maybeClose (internal/child_process.js:1021:16)
( Q5 P, Q# K) Egyp ERR! stack at Process.ChildProcess._handle.onexit (internal/child_process.js:286:5)
2 d6 [- Q. E- O4 D o6 V: Xgyp ERR! System Windows_NT 10.0.15063 2 o4 j% c( j7 r( \# C; l& ?4 K
- d: V% u; H/ s3 V; A+ I解决办法
* C' p) E7 T; t4 m8 A8 C6 d1、卸载nodejs重新安装一遍
% f9 R/ |9 ~% d& r! @1 v8 Y- p: O$ L5 f, {* F2 D
2、设置淘宝镜像 npm config set registry https://registry.npm.taobao.org: K. H g6 k, H$ _ n2 T9 N
2 C/ ^0 @* t [+ T0 L
3、安装nodejs所需的环境(Visual Studio XX、python什么鬼的),执行这个命令会自动检测并帮你安装好,npm install --g --production windows-build-tools6 m4 F2 V& X1 I3 ]( Q% U# B, S
————————————————# x1 v' v6 @" I( u# _+ c, r; f v
版权声明:本文为CSDN博主「一点一滴成长」的原创文章,遵循CC 4.0 BY-SA版权协议,转载请附上原文出处链接及本声明。- m/ r% x b! n5 k6 k6 o% T
原文链接:https://blog.csdn.net/qq_39946015/article/details/127351920 |
|