|
|
报错信息:
# W# z; c) [( j. O$ ?7 P o```bash
. Z# N' K2 `# C( N! ^: m! c/ ngyp ERR! find VS
" D0 Y1 G3 N. Y% C) a0 a; ?% ^gyp ERR! find VS msvs_version not set from command line or npm config$ \8 S% Q, s/ _' O
gyp ERR! find VS running in VS Command Prompt, installation path is:$ P, L$ p8 `1 R4 V( x# K6 S( o6 B
gyp ERR! find VS "C:\Program Files (x86)\Microsoft Visual Studio\2017"
. M" z$ o2 D- E: k5 ^7 Zgyp ERR! find VS - will only use this version
2 _1 @; F5 [2 t! ?& ~% Cgyp ERR! find VS could not use PowerShell to find Visual Studio 2017 or newer0 X' s, K2 r9 O0 E# a" v
gyp ERR! find VS looking for Visual Studio 2015
/ R0 i. c0 V% @0 H/ agyp ERR! find VS - not found
8 f0 P! P7 H$ b* Vgyp ERR! find VS looking for Visual Studio 2013
( v+ H$ Z' v+ ~* z4 ]% m, ~8 Agyp ERR! find VS - not found
. _* W8 `5 G$ \. D% Kgyp ERR! find VS
+ g, x8 L- R+ I0 [0 q+ U5 K$ Hgyp ERR! find VS **************************************************************5 h- C: f4 L# A8 q2 T
gyp ERR! find VS You need to install the latest version of Visual Studio8 @; k4 i' B& e, H d3 G& g
gyp ERR! find VS including the "Desktop development with C++" workload.
, R. f% n3 y, h! Agyp ERR! find VS For more information consult the documentation at:
7 P4 k( i, n, t; W; H0 h' H; k# Dgyp ERR! find VS https://github.com/nodejs/node-gyp#on-windows
/ p- Y4 a* {4 Zgyp ERR! find VS **************************************************************
# i! [0 g/ ]' c3 O0 B6 xgyp ERR! find VS
I. v: X1 { b8 F. @ lgyp ERR! configure error8 u% \% h8 V2 d; l' @/ n
gyp ERR! stack Error: Could not find any Visual Studio installation to use
8 b4 @% {! }+ s" ] y4 J$ M9 ?' lgyp ERR! stack at VisualStudioFinder.fail (D:\rymcu\electron-serialport\node_modules\node-gyp\lib\find-visualstu7 O+ g' ^( |; _$ K6 b
dio.js:121:47)
/ t6 G6 T; F) a+ ]. ]5 ~; x' xgyp ERR! stack at D:\rymcu\electron-serialport\node_modules\node-gyp\lib\find-visualstudio.js:74:169 _. h% n" b( C
gyp ERR! stack at D:\rymcu\electron-serialport\node_modules\node-gyp\lib\find-visualstudio.js:372:16
4 m# L* F: [, n% b) c5 R ggyp ERR! stack at D:\rymcu\electron-serialport\node_modules\node-gyp\lib\util.js:54:7
5 r6 q- @% t8 t5 Wgyp ERR! stack at D:\rymcu\electron-serialport\node_modules\node-gyp\lib\util.js:33:16
$ U6 A- T- f3 L: K/ X5 Y, Fgyp ERR! stack at ChildProcess.exithandler (child_process.js:310:5)! N+ c5 d% o+ [8 Y) S
gyp ERR! stack at ChildProcess.emit (events.js:315:20)
+ ?; n4 v) b$ ugyp ERR! stack at maybeClose (internal/child_process.js:1021:16) `+ J. f' ?) w. q* V" F5 r- G& q$ K
gyp ERR! stack at Process.ChildProcess._handle.onexit (internal/child_process.js:286:5). W9 q5 k, t5 \& a/ @+ S% M; S
gyp ERR! System Windows_NT 10.0.15063 ! M: w0 _9 D9 o
$ `1 O9 {8 A X! d, \7 P6 ]解决办法
7 [; m9 k1 g8 o6 _* K8 R1 T1、卸载nodejs重新安装一遍
( S! R4 {: b3 `! Y/ J8 r2 Z$ P2 d. l7 F6 ?2 V
2、设置淘宝镜像 npm config set registry https://registry.npm.taobao.org
0 y; x, H2 A" L; o' }: e5 ~0 E* S( r( y: H% q* B3 K0 d }9 l. l5 [
3、安装nodejs所需的环境(Visual Studio XX、python什么鬼的),执行这个命令会自动检测并帮你安装好,npm install --g --production windows-build-tools" @' H: Q3 D8 A0 H3 i
————————————————4 n2 G; V/ s# o6 A0 w* y+ C, n
版权声明:本文为CSDN博主「一点一滴成长」的原创文章,遵循CC 4.0 BY-SA版权协议,转载请附上原文出处链接及本声明。- B: g. H T+ ?4 y5 o/ X
原文链接:https://blog.csdn.net/qq_39946015/article/details/127351920 |
|