|
|
报错信息:
& ]+ b# N& w/ D) o9 l- \```bash8 u B; l$ i: ~1 C) q
gyp ERR! find VS
# V% [+ Y/ D& I$ B' ~4 A8 mgyp ERR! find VS msvs_version not set from command line or npm config' n2 e' V3 L7 k" X, T5 r3 Y
gyp ERR! find VS running in VS Command Prompt, installation path is:* C" I% S- [, e
gyp ERR! find VS "C:\Program Files (x86)\Microsoft Visual Studio\2017"
9 m3 B3 U3 K9 E) ]. a Ogyp ERR! find VS - will only use this version7 C! ]) K7 q& q7 \/ C- q. B! a* x7 I
gyp ERR! find VS could not use PowerShell to find Visual Studio 2017 or newer
7 e5 v6 ~3 k9 B1 q* ?, j. Q0 J* ugyp ERR! find VS looking for Visual Studio 2015+ t# S& P7 x5 L1 N I
gyp ERR! find VS - not found, e2 E5 T' T8 V- ^$ D9 k' i+ J
gyp ERR! find VS looking for Visual Studio 20130 ?- g3 c, o; A* q5 Y
gyp ERR! find VS - not found
. W. l- p5 H% s$ @gyp ERR! find VS/ r( M' I" V' F0 o' D* i( |: F
gyp ERR! find VS **************************************************************
* @- u- q0 T, M4 K' {gyp ERR! find VS You need to install the latest version of Visual Studio$ T3 V' ^7 ?6 h/ G8 T
gyp ERR! find VS including the "Desktop development with C++" workload.! R$ l- H- E w$ u! {
gyp ERR! find VS For more information consult the documentation at:
: |! C8 {% t9 J: Y9 M' \$ b+ a& wgyp ERR! find VS https://github.com/nodejs/node-gyp#on-windows
5 R4 M: W/ c$ K/ T6 T9 n# rgyp ERR! find VS **************************************************************/ o( g' B7 h! j, ?! d- W
gyp ERR! find VS: F6 V! ~, l M, [/ v
gyp ERR! configure error) g; D+ O$ B) i) o ~% S
gyp ERR! stack Error: Could not find any Visual Studio installation to use7 Y" J: c: p0 U
gyp ERR! stack at VisualStudioFinder.fail (D:\rymcu\electron-serialport\node_modules\node-gyp\lib\find-visualstu
$ Q+ r' _4 p& ^. ^dio.js:121:47)2 [3 h4 D/ Y, m7 g
gyp ERR! stack at D:\rymcu\electron-serialport\node_modules\node-gyp\lib\find-visualstudio.js:74:163 M1 w8 x/ c. s4 s9 O# N. d$ s
gyp ERR! stack at D:\rymcu\electron-serialport\node_modules\node-gyp\lib\find-visualstudio.js:372:16
9 [7 E% y& t7 d5 d( B6 Zgyp ERR! stack at D:\rymcu\electron-serialport\node_modules\node-gyp\lib\util.js:54:78 ]# h9 S9 H/ D6 ?: y
gyp ERR! stack at D:\rymcu\electron-serialport\node_modules\node-gyp\lib\util.js:33:16
$ {/ c4 z3 w5 F/ t, h- l5 qgyp ERR! stack at ChildProcess.exithandler (child_process.js:310:5)
/ A _4 V$ v! C& |% rgyp ERR! stack at ChildProcess.emit (events.js:315:20): ?4 O) e7 o6 n7 K7 Y0 m) l% \- q1 h
gyp ERR! stack at maybeClose (internal/child_process.js:1021:16) K" `# g/ ^6 J1 a n& F
gyp ERR! stack at Process.ChildProcess._handle.onexit (internal/child_process.js:286:5)
; L0 c) l. B q) Wgyp ERR! System Windows_NT 10.0.15063
4 G; G) Q e: Y7 ^4 X7 {5 U# J5 i" X1 I ]$ V3 z3 L- y: i8 N3 m/ J0 O
解决办法# V% }, R Y+ A4 t. e3 y1 U8 ?
1、卸载nodejs重新安装一遍+ z0 D# {& R& x$ z5 ?3 q
9 ^; o1 f9 ~* x0 ]* R; U2、设置淘宝镜像 npm config set registry https://registry.npm.taobao.org
" h: a5 A& m+ f/ ~
( L+ B4 {1 t9 M6 W$ ~3、安装nodejs所需的环境(Visual Studio XX、python什么鬼的),执行这个命令会自动检测并帮你安装好,npm install --g --production windows-build-tools+ e# }" o# u5 _+ h3 c$ B! y+ C
————————————————$ Q; B3 ]: I0 |" w2 K$ Z% {+ R
版权声明:本文为CSDN博主「一点一滴成长」的原创文章,遵循CC 4.0 BY-SA版权协议,转载请附上原文出处链接及本声明。 `8 N2 T( K! A
原文链接:https://blog.csdn.net/qq_39946015/article/details/127351920 |
|