|
|
报错信息:
) E" M, V, y2 g1 Z9 n# E```bash: k6 F- `) T: v4 U5 V
gyp ERR! find VS
5 |3 N9 O7 h2 q Z% Z- i/ hgyp ERR! find VS msvs_version not set from command line or npm config; Z* K+ l- S1 c9 p
gyp ERR! find VS running in VS Command Prompt, installation path is:
2 c/ b; Y% U# }gyp ERR! find VS "C:\Program Files (x86)\Microsoft Visual Studio\2017"0 W- L# m/ J, m3 }' @! ~) b( K
gyp ERR! find VS - will only use this version
, Z9 ~" `1 K0 f, j$ L" o2 I. D# qgyp ERR! find VS could not use PowerShell to find Visual Studio 2017 or newer
4 R( c9 `7 U9 m# Kgyp ERR! find VS looking for Visual Studio 2015
# r1 V+ E: y- a0 B" Dgyp ERR! find VS - not found
0 a9 {# _- m. sgyp ERR! find VS looking for Visual Studio 20138 v; M) w* `( y
gyp ERR! find VS - not found/ g9 C# N* I; z/ {7 x
gyp ERR! find VS) F3 }' h* B1 f9 E: u8 C) H
gyp ERR! find VS *************************************************************** C7 w4 @3 k5 x1 \
gyp ERR! find VS You need to install the latest version of Visual Studio
7 V9 w# @' M6 L1 J) x1 Q0 @gyp ERR! find VS including the "Desktop development with C++" workload.
: w# `0 x6 g5 G- G. c" ygyp ERR! find VS For more information consult the documentation at:
p/ b' O2 X/ H7 O1 Q2 hgyp ERR! find VS https://github.com/nodejs/node-gyp#on-windows& T# q9 K% q8 I- h
gyp ERR! find VS **************************************************************
9 e, ]7 J9 `8 d4 w, n! ]gyp ERR! find VS: k( T, D$ c9 n$ I% w+ @# p
gyp ERR! configure error
7 E' y/ l9 ?% k# i1 ogyp ERR! stack Error: Could not find any Visual Studio installation to use
2 H" G" O% t) _ d: Sgyp ERR! stack at VisualStudioFinder.fail (D:\rymcu\electron-serialport\node_modules\node-gyp\lib\find-visualstu/ R" H) z `: S/ a. S
dio.js:121:47)
. X* l9 o \3 ygyp ERR! stack at D:\rymcu\electron-serialport\node_modules\node-gyp\lib\find-visualstudio.js:74:16
" _$ b' X8 W; q% w) V. vgyp ERR! stack at D:\rymcu\electron-serialport\node_modules\node-gyp\lib\find-visualstudio.js:372:16
L/ q2 |2 p3 {. agyp ERR! stack at D:\rymcu\electron-serialport\node_modules\node-gyp\lib\util.js:54:71 {3 y8 _% d# x, C; u/ }
gyp ERR! stack at D:\rymcu\electron-serialport\node_modules\node-gyp\lib\util.js:33:16, v! b& D7 W$ f* ]
gyp ERR! stack at ChildProcess.exithandler (child_process.js:310:5)
% N; K3 a7 e: A# Q5 w( e1 y6 }7 c3 Ogyp ERR! stack at ChildProcess.emit (events.js:315:20)
6 z( a* I, ~$ h. U0 T: ~: S& ~gyp ERR! stack at maybeClose (internal/child_process.js:1021:16)' G; Y& J$ ]+ i! @- e
gyp ERR! stack at Process.ChildProcess._handle.onexit (internal/child_process.js:286:5)5 l0 @ c2 F% J5 n
gyp ERR! System Windows_NT 10.0.15063 ( ]4 o* t5 ?( C8 \# Z K
* M3 X1 F" v0 n$ [& o3 Z4 k
解决办法& t) i7 i9 D& C- b0 }
1、卸载nodejs重新安装一遍/ _( N% [/ h( m$ W1 V4 f1 C2 I
( |- H6 C+ g( y4 t7 g' v' Y' o2、设置淘宝镜像 npm config set registry https://registry.npm.taobao.org
/ S2 d2 }* F" v# S2 x; n: P) ~! y/ p% |. f0 J" Y& t# V5 |' Y
3、安装nodejs所需的环境(Visual Studio XX、python什么鬼的),执行这个命令会自动检测并帮你安装好,npm install --g --production windows-build-tools
4 r D2 S9 i8 A) C+ S————————————————
; Y" a8 T8 Q9 D( S6 E版权声明:本文为CSDN博主「一点一滴成长」的原创文章,遵循CC 4.0 BY-SA版权协议,转载请附上原文出处链接及本声明。
5 _, f" s0 `) R. u/ D$ R原文链接:https://blog.csdn.net/qq_39946015/article/details/127351920 |
|