|
|
报错信息:
% s* {, L' n6 x b' t```bash! m' s" t1 K( ^, p+ u2 x# z* R) p
gyp ERR! find VS
/ I5 |" [' b& V: z, K& J/ Xgyp ERR! find VS msvs_version not set from command line or npm config
7 S( w0 W# b+ sgyp ERR! find VS running in VS Command Prompt, installation path is:
" P- K# r0 p3 }9 Qgyp ERR! find VS "C:\Program Files (x86)\Microsoft Visual Studio\2017"9 l% L5 E# `9 q7 b0 X( K
gyp ERR! find VS - will only use this version% ?( N- v% b6 u1 [! y# n* M
gyp ERR! find VS could not use PowerShell to find Visual Studio 2017 or newer
, p: v1 i) F7 kgyp ERR! find VS looking for Visual Studio 2015 P0 Y8 w w6 g
gyp ERR! find VS - not found* |% Q. e1 H! c! t* ~
gyp ERR! find VS looking for Visual Studio 20134 m, f/ a5 z% W8 A7 r$ P
gyp ERR! find VS - not found* _6 B/ Z% p& g
gyp ERR! find VS% ^" J' C$ }' G& o9 e3 M' u
gyp ERR! find VS **************************************************************
0 B. e' v3 g! Y6 J1 ygyp ERR! find VS You need to install the latest version of Visual Studio
% P0 s, x3 e- M) O! Vgyp ERR! find VS including the "Desktop development with C++" workload./ U1 Y1 @! K* A8 b& W M8 z( }
gyp ERR! find VS For more information consult the documentation at:4 P5 ?0 W8 ]/ {7 o* O9 l
gyp ERR! find VS https://github.com/nodejs/node-gyp#on-windows
7 J1 y5 O' Q% J, Z2 l( o1 e* A$ }( Ngyp ERR! find VS **************************************************************
9 y6 L( p/ g; Z8 u! c/ Qgyp ERR! find VS4 g! a Q3 D1 h% o" e' I
gyp ERR! configure error
+ p. }6 _( E' @' [# vgyp ERR! stack Error: Could not find any Visual Studio installation to use
$ o6 |2 W+ Z- J( }6 H$ {% p5 `gyp ERR! stack at VisualStudioFinder.fail (D:\rymcu\electron-serialport\node_modules\node-gyp\lib\find-visualstu6 E+ ?5 G3 k+ l# A. k# L
dio.js:121:47)
; k+ K- V1 P4 f6 N% L7 |" s2 ^5 Ygyp ERR! stack at D:\rymcu\electron-serialport\node_modules\node-gyp\lib\find-visualstudio.js:74:16' `0 a; A0 A! }- F! p' ?# Z4 K
gyp ERR! stack at D:\rymcu\electron-serialport\node_modules\node-gyp\lib\find-visualstudio.js:372:16; |- Z) M! `7 R( \ i; I8 k' A
gyp ERR! stack at D:\rymcu\electron-serialport\node_modules\node-gyp\lib\util.js:54:74 |- z9 V. h, H+ @# e) B1 @" i
gyp ERR! stack at D:\rymcu\electron-serialport\node_modules\node-gyp\lib\util.js:33:16
/ J* D0 S+ h. `7 |gyp ERR! stack at ChildProcess.exithandler (child_process.js:310:5)8 W7 Z2 M! h$ Z$ J" w
gyp ERR! stack at ChildProcess.emit (events.js:315:20)4 S4 M6 ]! m+ c* }. ?
gyp ERR! stack at maybeClose (internal/child_process.js:1021:16)/ d: \& @/ L( p7 |
gyp ERR! stack at Process.ChildProcess._handle.onexit (internal/child_process.js:286:5)4 I9 J- N, U z. ]2 W( E
gyp ERR! System Windows_NT 10.0.15063 ; \) ^! _( v% B. l; V/ L e* S
3 F) X$ z, R- E6 t5 L
解决办法
# d; ?, D5 @& _, D1 a1、卸载nodejs重新安装一遍
, r R2 {+ W. {& a# \% V3 n; J- E
2、设置淘宝镜像 npm config set registry https://registry.npm.taobao.org
' e1 [ f! H& m8 m# E
3 v; Y3 K+ P( h3、安装nodejs所需的环境(Visual Studio XX、python什么鬼的),执行这个命令会自动检测并帮你安装好,npm install --g --production windows-build-tools
1 \& T# K+ n0 r3 s2 A: m4 D/ F————————————————
8 n+ F) c- {' h3 G8 Y; z" U1 L/ U- j版权声明:本文为CSDN博主「一点一滴成长」的原创文章,遵循CC 4.0 BY-SA版权协议,转载请附上原文出处链接及本声明。
2 d3 I; e8 D) ?: \) Z; O) i原文链接:https://blog.csdn.net/qq_39946015/article/details/127351920 |
|