|
|
报错信息:
" l' t: u' X2 i, |$ Y```bash
/ m) g% x6 v2 C- qgyp ERR! find VS& k2 m& ?, [: Z' {# K
gyp ERR! find VS msvs_version not set from command line or npm config
1 s) R, \' v* K/ C/ X5 [gyp ERR! find VS running in VS Command Prompt, installation path is:! I' C9 S! t6 z# ~2 D0 d- F1 i; f
gyp ERR! find VS "C:\Program Files (x86)\Microsoft Visual Studio\2017"
/ f. ]" z! U8 S$ z$ [gyp ERR! find VS - will only use this version
! j9 O9 c+ }3 }4 ]. O( |& u) xgyp ERR! find VS could not use PowerShell to find Visual Studio 2017 or newer2 f t$ V2 C; V; e
gyp ERR! find VS looking for Visual Studio 2015
" _7 X1 M$ b3 @# Z% E% m& u5 Dgyp ERR! find VS - not found
. j1 F& E8 t. Z) W; U/ {gyp ERR! find VS looking for Visual Studio 2013
, L+ i4 i6 J4 x/ P/ h0 b- U4 Vgyp ERR! find VS - not found2 c/ ^+ ]; E, o% m. Q: e/ D
gyp ERR! find VS/ f4 N0 a; Z, I( \; M. {+ b
gyp ERR! find VS **************************************************************, r' v6 Y% A0 g; ^/ j
gyp ERR! find VS You need to install the latest version of Visual Studio8 E) Q. w' u* |0 Z, @- F: F
gyp ERR! find VS including the "Desktop development with C++" workload.7 F- u5 |" Y% d e. m
gyp ERR! find VS For more information consult the documentation at:
! k/ G4 H. I0 e6 C) [3 i2 Lgyp ERR! find VS https://github.com/nodejs/node-gyp#on-windows
4 @& T; b3 F2 d( ?: ^gyp ERR! find VS **************************************************************
3 r. q! b- i+ ^5 L: d; Agyp ERR! find VS) E, B! ~; p, _3 p+ R
gyp ERR! configure error9 b9 x) c6 J- N4 T( E
gyp ERR! stack Error: Could not find any Visual Studio installation to use
, _; I! e- B1 hgyp ERR! stack at VisualStudioFinder.fail (D:\rymcu\electron-serialport\node_modules\node-gyp\lib\find-visualstu
[" n' q* T; @9 ldio.js:121:47)+ i d4 [) j2 v4 K. z
gyp ERR! stack at D:\rymcu\electron-serialport\node_modules\node-gyp\lib\find-visualstudio.js:74:16
/ n/ h: h+ `/ ~" D( x' wgyp ERR! stack at D:\rymcu\electron-serialport\node_modules\node-gyp\lib\find-visualstudio.js:372:16# T: i! ?8 @( E# Y# p' E# \0 y
gyp ERR! stack at D:\rymcu\electron-serialport\node_modules\node-gyp\lib\util.js:54:7
$ @ B( `" ]2 F! Dgyp ERR! stack at D:\rymcu\electron-serialport\node_modules\node-gyp\lib\util.js:33:16. _4 B8 t- Q0 B
gyp ERR! stack at ChildProcess.exithandler (child_process.js:310:5): ]* E% u3 ]0 |" I. @6 W
gyp ERR! stack at ChildProcess.emit (events.js:315:20)
" m4 N1 i' ^2 ?) P/ g& a& N8 bgyp ERR! stack at maybeClose (internal/child_process.js:1021:16)3 `! z7 S* {' {+ E& G( X. f2 |) H
gyp ERR! stack at Process.ChildProcess._handle.onexit (internal/child_process.js:286:5)
8 B L: e9 M/ t, m5 x' ?gyp ERR! System Windows_NT 10.0.15063
* l3 l1 g) c- M
$ d( N3 c# H- v3 T+ W2 ?3 h/ P解决办法
9 s$ E; _ M1 B$ e1 b* z5 @* q' r1、卸载nodejs重新安装一遍
' n$ i4 f" I4 T- p
1 c0 S) z+ y) }9 N1 j; B3 w2、设置淘宝镜像 npm config set registry https://registry.npm.taobao.org
# x7 F" l: A0 o! f2 { K, w6 V# o/ q$ U" I9 s3 L
3、安装nodejs所需的环境(Visual Studio XX、python什么鬼的),执行这个命令会自动检测并帮你安装好,npm install --g --production windows-build-tools/ r# |" z8 I& j# G- }) b- V5 N
————————————————
8 Y: t4 L* _6 D/ ^3 h版权声明:本文为CSDN博主「一点一滴成长」的原创文章,遵循CC 4.0 BY-SA版权协议,转载请附上原文出处链接及本声明。) ]) a6 X+ U1 o0 u# }: ?+ G
原文链接:https://blog.csdn.net/qq_39946015/article/details/127351920 |
|