|
|
报错信息:
# E3 y2 f) c* Z+ O, w```bash/ l1 l& o% W) @1 C$ T
gyp ERR! find VS# y* t% i( f& Q
gyp ERR! find VS msvs_version not set from command line or npm config( ^, X4 L# F1 q9 a
gyp ERR! find VS running in VS Command Prompt, installation path is:
' x% I8 S5 N: l0 Z7 Cgyp ERR! find VS "C:\Program Files (x86)\Microsoft Visual Studio\2017"
+ ~6 Z" j3 {. a; p8 S# ^gyp ERR! find VS - will only use this version- w$ H" X+ m: g* B8 H
gyp ERR! find VS could not use PowerShell to find Visual Studio 2017 or newer
1 d4 s( t( x8 S+ v$ J' \gyp ERR! find VS looking for Visual Studio 2015
% J* b/ w9 e2 H& t; Ogyp ERR! find VS - not found
7 C* ]# i4 l a& @$ f% u% jgyp ERR! find VS looking for Visual Studio 2013" F6 ] i7 H% _: x
gyp ERR! find VS - not found1 r y# Q* y4 S! X! O
gyp ERR! find VS, t- `& U- s* O: b( [# e1 {
gyp ERR! find VS **************************************************************
# N1 ~$ O8 l) O5 x o9 @# Wgyp ERR! find VS You need to install the latest version of Visual Studio
2 S3 {$ A. i0 [* \% G% m0 O/ n( Agyp ERR! find VS including the "Desktop development with C++" workload.
/ O4 m/ S' k. g# Y& vgyp ERR! find VS For more information consult the documentation at:
9 f7 l3 W8 q1 C5 ~& J5 Pgyp ERR! find VS https://github.com/nodejs/node-gyp#on-windows* @( `! v6 A1 v0 `
gyp ERR! find VS **************************************************************0 W+ ~( m. A \( u! l
gyp ERR! find VS
3 Q7 m1 u$ h7 c6 Ogyp ERR! configure error
1 l# f* K2 V, j. D; [1 Agyp ERR! stack Error: Could not find any Visual Studio installation to use J% a+ b3 R$ H
gyp ERR! stack at VisualStudioFinder.fail (D:\rymcu\electron-serialport\node_modules\node-gyp\lib\find-visualstu/ `( B. T8 P# w& [: @
dio.js:121:47)
0 T. L _1 A/ H" J) Vgyp ERR! stack at D:\rymcu\electron-serialport\node_modules\node-gyp\lib\find-visualstudio.js:74:160 E6 X7 Q; F. S% E. _) u
gyp ERR! stack at D:\rymcu\electron-serialport\node_modules\node-gyp\lib\find-visualstudio.js:372:16/ O" }, S3 a2 r2 h
gyp ERR! stack at D:\rymcu\electron-serialport\node_modules\node-gyp\lib\util.js:54:7! _9 t! M! h* z* Q/ Y# L8 g4 W
gyp ERR! stack at D:\rymcu\electron-serialport\node_modules\node-gyp\lib\util.js:33:16
6 v; M' J0 s8 Bgyp ERR! stack at ChildProcess.exithandler (child_process.js:310:5)
. a# B4 c! s0 q7 C E( k4 Tgyp ERR! stack at ChildProcess.emit (events.js:315:20)
( W3 v* \- F# m! |: A% Jgyp ERR! stack at maybeClose (internal/child_process.js:1021:16)
5 u6 ?, E6 D3 ?1 q$ Ogyp ERR! stack at Process.ChildProcess._handle.onexit (internal/child_process.js:286:5)
6 l7 v- ~" g/ ~+ t" L- Dgyp ERR! System Windows_NT 10.0.15063 3 K( b- a/ I3 m7 H0 J
5 v& W. r- r2 x9 Z# K解决办法; \+ \0 G9 I2 x. U" k$ K3 N/ O) I
1、卸载nodejs重新安装一遍
' Y0 W$ R0 i) S' ?5 U5 M2 r# | j7 _3 E9 M( c1 t6 f3 A" H
2、设置淘宝镜像 npm config set registry https://registry.npm.taobao.org
" e8 g7 l) h/ b7 |8 |5 h8 `; m+ p; W) a' V4 |) B' S! i! m
3、安装nodejs所需的环境(Visual Studio XX、python什么鬼的),执行这个命令会自动检测并帮你安装好,npm install --g --production windows-build-tools6 q5 b' h! a! S" Z
————————————————# {4 S/ O- s; I
版权声明:本文为CSDN博主「一点一滴成长」的原创文章,遵循CC 4.0 BY-SA版权协议,转载请附上原文出处链接及本声明。; b9 {" {' o5 p- i( v+ M( Z( U8 |8 v
原文链接:https://blog.csdn.net/qq_39946015/article/details/127351920 |
|