|
|
报错信息:" @' H* P& A& Q- g1 E
```bash
" s' h/ r1 k! K) y$ Ogyp ERR! find VS" A( v* g6 z% |+ u$ {4 U
gyp ERR! find VS msvs_version not set from command line or npm config
9 D% E9 z8 }* Y" ggyp ERR! find VS running in VS Command Prompt, installation path is:
4 a3 F8 o6 z- g: B& b# ]& D" Xgyp ERR! find VS "C:\Program Files (x86)\Microsoft Visual Studio\2017"8 T, D- o- X) }1 S" X' c& r a
gyp ERR! find VS - will only use this version: s7 M9 Q7 \. w+ a& {7 A3 o
gyp ERR! find VS could not use PowerShell to find Visual Studio 2017 or newer W+ B, E9 F* u
gyp ERR! find VS looking for Visual Studio 2015
# Q# F& c9 l6 t% u; x* w& [gyp ERR! find VS - not found( D3 k5 R3 j+ ]# ?& u- a( e( A- D1 a
gyp ERR! find VS looking for Visual Studio 2013
, E5 b6 \9 S* y/ Igyp ERR! find VS - not found
3 n$ X `! F, k0 |0 W- sgyp ERR! find VS
/ T0 e9 l% v( ~! W/ {" C+ m+ |gyp ERR! find VS **************************************************************0 \1 s* A" V4 j$ q
gyp ERR! find VS You need to install the latest version of Visual Studio
* x8 E' O$ Q8 S3 S- v, \( ]" A! ygyp ERR! find VS including the "Desktop development with C++" workload. N, @ r: a9 Y2 W2 X: P: |' i7 a
gyp ERR! find VS For more information consult the documentation at:: {$ U! c; y1 ^2 J
gyp ERR! find VS https://github.com/nodejs/node-gyp#on-windows
; i9 t! w/ _: ^; x+ cgyp ERR! find VS **************************************************************
5 T% S% t4 k" |+ u+ h+ T9 S8 \( y' Jgyp ERR! find VS
{0 s K. a3 d# F2 _! Zgyp ERR! configure error* N( L2 a& d( `7 i! o3 E
gyp ERR! stack Error: Could not find any Visual Studio installation to use9 t4 L7 Q. s9 a e h e1 _
gyp ERR! stack at VisualStudioFinder.fail (D:\rymcu\electron-serialport\node_modules\node-gyp\lib\find-visualstu2 D4 ?8 q6 ]9 i6 V. e& O) U
dio.js:121:47)- m9 g! {6 T* P7 d5 u- P
gyp ERR! stack at D:\rymcu\electron-serialport\node_modules\node-gyp\lib\find-visualstudio.js:74:166 Y4 \; J- B! J* @
gyp ERR! stack at D:\rymcu\electron-serialport\node_modules\node-gyp\lib\find-visualstudio.js:372:16
3 Q. W8 Q. c% |) v! sgyp ERR! stack at D:\rymcu\electron-serialport\node_modules\node-gyp\lib\util.js:54:77 N0 V9 ~$ i y& L, W8 j9 m
gyp ERR! stack at D:\rymcu\electron-serialport\node_modules\node-gyp\lib\util.js:33:163 a, n9 i& V( r- N! H" r; Z
gyp ERR! stack at ChildProcess.exithandler (child_process.js:310:5)- z2 g1 T0 Y& f$ e" u
gyp ERR! stack at ChildProcess.emit (events.js:315:20), d1 v: a) S; j# d& X+ x* K- b9 ~
gyp ERR! stack at maybeClose (internal/child_process.js:1021:16)
$ ?, D* j4 M, `1 t1 }% wgyp ERR! stack at Process.ChildProcess._handle.onexit (internal/child_process.js:286:5)/ _1 }- Q" A% ~" {" @* E- s# d
gyp ERR! System Windows_NT 10.0.15063 ' A6 b: Y: [% u' T$ t
4 x, k: |3 z0 P$ U6 V5 Z, q解决办法3 Q( x4 I; ?9 L& P& o: k; T: {: X
1、卸载nodejs重新安装一遍
. L0 M& _( W& v% f/ A' ]! W$ Y$ X+ i; M# s0 d: M
2、设置淘宝镜像 npm config set registry https://registry.npm.taobao.org- E- k" t# b' d% u
! s1 W1 u! I- G. q9 X m0 ]3、安装nodejs所需的环境(Visual Studio XX、python什么鬼的),执行这个命令会自动检测并帮你安装好,npm install --g --production windows-build-tools+ p0 f3 \+ H6 Y; n0 ^
————————————————- s/ x" V& E2 B. H: t. j, |
版权声明:本文为CSDN博主「一点一滴成长」的原创文章,遵循CC 4.0 BY-SA版权协议,转载请附上原文出处链接及本声明。, g% |2 H7 V2 m9 k2 \$ \+ `
原文链接:https://blog.csdn.net/qq_39946015/article/details/127351920 |
|