|
|
报错信息:
6 I# A! x- N, b! s' y# w+ k" O```bash
+ Y9 y. v% V r' R3 x, Hgyp ERR! find VS
& Y( O+ k) I% F8 R8 I8 {+ Z$ Mgyp ERR! find VS msvs_version not set from command line or npm config
6 a+ {, z" b5 x5 f( Y( o, E/ {: ggyp ERR! find VS running in VS Command Prompt, installation path is: w" K4 }& { M5 o; T w
gyp ERR! find VS "C:\Program Files (x86)\Microsoft Visual Studio\2017"
$ p/ F+ D/ g* }' S7 i0 v' N$ Mgyp ERR! find VS - will only use this version% I0 P# y, ~0 l m+ D
gyp ERR! find VS could not use PowerShell to find Visual Studio 2017 or newer
+ \- e9 D8 V, N) A& n0 D, qgyp ERR! find VS looking for Visual Studio 2015
2 u. G- M8 c. e( T: e% ogyp ERR! find VS - not found( }+ h- W8 I W& Q! I
gyp ERR! find VS looking for Visual Studio 2013
) A4 B0 N( C8 ? e8 N* Bgyp ERR! find VS - not found
. C* l, ], J3 z& m# x+ Z4 wgyp ERR! find VS
1 F: i2 }' K: J& u2 Y- _ M* Jgyp ERR! find VS **************************************************************
1 U. @3 }3 }5 m! W( s* F4 pgyp ERR! find VS You need to install the latest version of Visual Studio8 c1 l3 r' {! i* q
gyp ERR! find VS including the "Desktop development with C++" workload./ [! i! a8 x7 }# @
gyp ERR! find VS For more information consult the documentation at:+ s+ Q. b; D: b" O
gyp ERR! find VS https://github.com/nodejs/node-gyp#on-windows
4 g g- [+ X3 @+ igyp ERR! find VS **************************************************************8 _, R0 X: ?5 M k! x6 e p. [
gyp ERR! find VS8 e* W1 }1 q; N' w- Q
gyp ERR! configure error
; w/ e' ^% `/ Q- ogyp ERR! stack Error: Could not find any Visual Studio installation to use
0 h' @$ d0 j" g5 ]gyp ERR! stack at VisualStudioFinder.fail (D:\rymcu\electron-serialport\node_modules\node-gyp\lib\find-visualstu
, D" T1 l, I( `( d6 _ y9 L- {$ adio.js:121:47)6 h: Q) k# Y4 R4 X& I
gyp ERR! stack at D:\rymcu\electron-serialport\node_modules\node-gyp\lib\find-visualstudio.js:74:16- d F; |* y% R* S- }' k
gyp ERR! stack at D:\rymcu\electron-serialport\node_modules\node-gyp\lib\find-visualstudio.js:372:165 f3 U& n3 q! ^& u( o+ D
gyp ERR! stack at D:\rymcu\electron-serialport\node_modules\node-gyp\lib\util.js:54:7- `% A' g6 S( j
gyp ERR! stack at D:\rymcu\electron-serialport\node_modules\node-gyp\lib\util.js:33:16. A5 N9 h6 ~( I' F) m+ H% e) K
gyp ERR! stack at ChildProcess.exithandler (child_process.js:310:5)
G/ ~- m! [3 \# }. Z: R2 }( Kgyp ERR! stack at ChildProcess.emit (events.js:315:20)6 |9 s4 W2 K+ ~% ^; R, f, Z
gyp ERR! stack at maybeClose (internal/child_process.js:1021:16)
4 v+ W1 t; i$ g7 x* z6 X1 jgyp ERR! stack at Process.ChildProcess._handle.onexit (internal/child_process.js:286:5)
& D; B3 j6 K0 U) agyp ERR! System Windows_NT 10.0.15063 2 _- L9 g: M9 ?8 s8 Y6 {
0 b5 Q; i. o0 d+ D0 k* Q) `
解决办法
. C* o9 z7 B1 ]% A Q/ d. s2 w1、卸载nodejs重新安装一遍
: z6 j& a W. f' l6 y' h! Q/ v0 r0 W' ?, _ r9 H
2、设置淘宝镜像 npm config set registry https://registry.npm.taobao.org
4 p7 o7 g* U/ P* m1 h4 H4 t9 X# C, t9 x& E7 w
3、安装nodejs所需的环境(Visual Studio XX、python什么鬼的),执行这个命令会自动检测并帮你安装好,npm install --g --production windows-build-tools, y( L4 c1 R% f
————————————————
K! k3 c( A! o版权声明:本文为CSDN博主「一点一滴成长」的原创文章,遵循CC 4.0 BY-SA版权协议,转载请附上原文出处链接及本声明。2 Z! K. l/ d3 ?2 B
原文链接:https://blog.csdn.net/qq_39946015/article/details/127351920 |
|