|
|
报错信息:
: A# U' ?7 y$ s8 |```bash3 G6 P. e1 p1 T" F
gyp ERR! find VS
$ a, F* S- O% R/ ]9 ogyp ERR! find VS msvs_version not set from command line or npm config% F: l. p( I: m
gyp ERR! find VS running in VS Command Prompt, installation path is:
1 I" ?& G% Y, x! M' K7 o, Bgyp ERR! find VS "C:\Program Files (x86)\Microsoft Visual Studio\2017"
. V# J E% H* X' J0 @% v1 E+ Pgyp ERR! find VS - will only use this version
! v# `. Y/ `4 e1 b) }gyp ERR! find VS could not use PowerShell to find Visual Studio 2017 or newer8 r! o8 ^) y/ [* ~! t) e
gyp ERR! find VS looking for Visual Studio 20155 t0 @7 t1 ]+ r# l. p" L Q J
gyp ERR! find VS - not found
1 ~, R8 N) |8 tgyp ERR! find VS looking for Visual Studio 20132 s( P, ]4 `1 W! a' g
gyp ERR! find VS - not found
4 p, s. w6 d4 Q7 ]' J8 a, hgyp ERR! find VS: b6 b3 |. e0 C& I0 {" r) F
gyp ERR! find VS **************************************************************
9 U- b# l' R! U3 K5 ~gyp ERR! find VS You need to install the latest version of Visual Studio
) L; ^+ E6 F0 A0 ?4 v4 r( hgyp ERR! find VS including the "Desktop development with C++" workload.0 t( K. I) u G6 f
gyp ERR! find VS For more information consult the documentation at:* l/ | ~- o' K/ b- H4 T3 ], g
gyp ERR! find VS https://github.com/nodejs/node-gyp#on-windows* o [( f5 K; D2 C
gyp ERR! find VS **************************************************************
& p9 r- T! N1 n9 ~gyp ERR! find VS
9 n. [# t& ^9 J2 E% lgyp ERR! configure error4 y* c2 t7 w2 U6 A% ]: U
gyp ERR! stack Error: Could not find any Visual Studio installation to use
( J) Q n9 Z& X9 c, {gyp ERR! stack at VisualStudioFinder.fail (D:\rymcu\electron-serialport\node_modules\node-gyp\lib\find-visualstu
@5 j% W6 t, W, `% d7 J5 bdio.js:121:47)
# l ^" E$ G* r2 Tgyp ERR! stack at D:\rymcu\electron-serialport\node_modules\node-gyp\lib\find-visualstudio.js:74:161 ?3 Q$ U$ s+ T; N
gyp ERR! stack at D:\rymcu\electron-serialport\node_modules\node-gyp\lib\find-visualstudio.js:372:16
$ @# a, G3 \3 E' |2 E0 jgyp ERR! stack at D:\rymcu\electron-serialport\node_modules\node-gyp\lib\util.js:54:7
7 _- y' [$ y |6 |gyp ERR! stack at D:\rymcu\electron-serialport\node_modules\node-gyp\lib\util.js:33:169 m) y$ Y/ f0 D7 h: E
gyp ERR! stack at ChildProcess.exithandler (child_process.js:310:5)
. s' s$ L1 A1 G) m; U( ngyp ERR! stack at ChildProcess.emit (events.js:315:20)
9 h, x* S, M; g, o) T. \: ogyp ERR! stack at maybeClose (internal/child_process.js:1021:16)
4 h. c- \( P: I: kgyp ERR! stack at Process.ChildProcess._handle.onexit (internal/child_process.js:286:5)
9 r+ X$ c7 `* S p, a8 B7 C7 vgyp ERR! System Windows_NT 10.0.15063 . a; \$ q+ k# i4 e
. {+ Y3 L/ M9 E, q0 v2 e解决办法6 d: v5 W9 G& r! L1 Q5 C
1、卸载nodejs重新安装一遍0 O$ C" _) ]3 c0 S8 p' n8 r3 w
! v! N* ] ~* l/ H3 j
2、设置淘宝镜像 npm config set registry https://registry.npm.taobao.org0 g# F- n5 | p8 Z. |2 f* |# d* g
8 X, |4 l- ~# s' J" G2 L
3、安装nodejs所需的环境(Visual Studio XX、python什么鬼的),执行这个命令会自动检测并帮你安装好,npm install --g --production windows-build-tools
8 b# c, H. \ a6 i6 O* j; n: p————————————————, r: E6 U' d% Y
版权声明:本文为CSDN博主「一点一滴成长」的原创文章,遵循CC 4.0 BY-SA版权协议,转载请附上原文出处链接及本声明。& R* C) y. a5 n3 F# w# s; v
原文链接:https://blog.csdn.net/qq_39946015/article/details/127351920 |
|