|
报错信息:
( `6 K0 w+ _% A* K) Y```bash9 ~/ c- Y/ |0 c9 H# c
gyp ERR! find VS$ A( Q7 ^: E5 X- ^
gyp ERR! find VS msvs_version not set from command line or npm config
% U( C$ Q- z& U& [" `2 X1 x7 h2 f9 Agyp ERR! find VS running in VS Command Prompt, installation path is:. z# E3 j/ F& t' i5 _1 C$ s
gyp ERR! find VS "C:\Program Files (x86)\Microsoft Visual Studio\2017"
+ A6 V2 P% H# m3 @9 V1 ngyp ERR! find VS - will only use this version
! v; W$ c, P+ ~3 C# Qgyp ERR! find VS could not use PowerShell to find Visual Studio 2017 or newer
- P# X* ]: P8 L9 v4 Cgyp ERR! find VS looking for Visual Studio 2015
( u4 K% M. R3 m0 Ugyp ERR! find VS - not found: w! H# ~9 u. x# D5 ?4 X: O4 h2 _
gyp ERR! find VS looking for Visual Studio 2013* }8 K3 E, y9 b& w3 @4 L
gyp ERR! find VS - not found
+ @) c/ f! z( B% vgyp ERR! find VS
- w! j3 S1 z* h7 P! m9 igyp ERR! find VS **************************************************************1 N" z8 q q; E5 [
gyp ERR! find VS You need to install the latest version of Visual Studio
# l. G' ~! L- b- V+ Y4 {gyp ERR! find VS including the "Desktop development with C++" workload.) X# z! Y5 M! z; N- X: f7 ~
gyp ERR! find VS For more information consult the documentation at:
( s+ J; Y3 c' T# i4 z. Vgyp ERR! find VS https://github.com/nodejs/node-gyp#on-windows
. C w+ c: B$ M; `gyp ERR! find VS **************************************************************' D1 s- Y0 ]( t
gyp ERR! find VS% O) k9 a% k' m7 |& Z9 M
gyp ERR! configure error
9 Q" Y/ `) t7 `( X! b6 a0 sgyp ERR! stack Error: Could not find any Visual Studio installation to use
& S: t2 Z) k8 t0 L/ J; t0 k: Cgyp ERR! stack at VisualStudioFinder.fail (D:\rymcu\electron-serialport\node_modules\node-gyp\lib\find-visualstu' D9 e6 h) y7 A5 p, J
dio.js:121:47)
% _! ~1 h& _7 N" z. f, Ugyp ERR! stack at D:\rymcu\electron-serialport\node_modules\node-gyp\lib\find-visualstudio.js:74:16; U3 g( _# {( E) ^" z' A
gyp ERR! stack at D:\rymcu\electron-serialport\node_modules\node-gyp\lib\find-visualstudio.js:372:168 c9 E: E0 k( z% ^/ r
gyp ERR! stack at D:\rymcu\electron-serialport\node_modules\node-gyp\lib\util.js:54:7
- ~, y# H/ B8 K3 ~gyp ERR! stack at D:\rymcu\electron-serialport\node_modules\node-gyp\lib\util.js:33:16+ c5 m) j1 l9 \$ E; b0 `; K
gyp ERR! stack at ChildProcess.exithandler (child_process.js:310:5)
' D# z" D' e3 |8 rgyp ERR! stack at ChildProcess.emit (events.js:315:20)( b4 j$ C9 q) T5 J
gyp ERR! stack at maybeClose (internal/child_process.js:1021:16)
( n7 W) Q9 R) t/ N# Pgyp ERR! stack at Process.ChildProcess._handle.onexit (internal/child_process.js:286:5)) D' ]. M) T' q$ L
gyp ERR! System Windows_NT 10.0.15063
3 S, h) {! `" N' `& r4 i. w. o1 [0 [, r& o6 f$ X
解决办法
) V" F1 l6 A/ _1、卸载nodejs重新安装一遍0 G0 H7 r( Y& V( [1 H; _2 x
" [: n/ P6 \& E" p. y: p! x+ V2、设置淘宝镜像 npm config set registry https://registry.npm.taobao.org
$ L* e% a3 }/ L; H( @
) y U! N$ a5 }% b' m. S1 A" s3、安装nodejs所需的环境(Visual Studio XX、python什么鬼的),执行这个命令会自动检测并帮你安装好,npm install --g --production windows-build-tools0 B. V$ C4 f% p3 J
————————————————2 N: r; r+ P+ A& S8 n+ l) K8 T
版权声明:本文为CSDN博主「一点一滴成长」的原创文章,遵循CC 4.0 BY-SA版权协议,转载请附上原文出处链接及本声明。
% b1 I1 I2 L) k) X- {( u原文链接:https://blog.csdn.net/qq_39946015/article/details/127351920 |
|