|
|
报错信息:
, U) a' W( I% s6 n1 w) P```bash* Z. q- o4 n! P3 l' q `/ |8 `
gyp ERR! find VS2 ?, y, V- M- o4 \
gyp ERR! find VS msvs_version not set from command line or npm config6 C7 \: S; n7 c" k& @2 @; k" j
gyp ERR! find VS running in VS Command Prompt, installation path is:
A+ a! {8 |! L. U' j% qgyp ERR! find VS "C:\Program Files (x86)\Microsoft Visual Studio\2017"
+ `. c) Q, k8 i# f; H3 L" [- agyp ERR! find VS - will only use this version8 n9 w0 X; [4 P3 B" d& G0 b' R
gyp ERR! find VS could not use PowerShell to find Visual Studio 2017 or newer0 s$ p3 m% Z) K3 _ N% U
gyp ERR! find VS looking for Visual Studio 2015 Q4 H3 t9 }9 D- M9 q: a+ E+ y
gyp ERR! find VS - not found
+ a5 f; N8 C# U$ g- Agyp ERR! find VS looking for Visual Studio 2013
! ^* I) I2 k' B5 ?; b7 X3 W$ ?- lgyp ERR! find VS - not found" K5 A% x% P9 i2 [0 Z! x }
gyp ERR! find VS. c, W* V% H' U: w7 i$ Q7 Y3 P
gyp ERR! find VS **************************************************************8 G" ]8 y) ?, U# O4 g- s" h& ]
gyp ERR! find VS You need to install the latest version of Visual Studio) ~ ], e# X: }# {0 n$ o
gyp ERR! find VS including the "Desktop development with C++" workload.
$ q6 T" ]/ Y3 C% dgyp ERR! find VS For more information consult the documentation at:
, o! o6 R4 d) k4 R0 b) k0 Pgyp ERR! find VS https://github.com/nodejs/node-gyp#on-windows, _+ O% Q1 }7 f% T* t
gyp ERR! find VS **************************************************************
# b3 n' b# `' }1 q" h$ a: y/ Fgyp ERR! find VS7 l0 K* {" L' d/ N% b
gyp ERR! configure error
1 L5 t0 [. N4 Z* R- Bgyp ERR! stack Error: Could not find any Visual Studio installation to use. M: P. Z6 S1 v
gyp ERR! stack at VisualStudioFinder.fail (D:\rymcu\electron-serialport\node_modules\node-gyp\lib\find-visualstu. a: J5 c. H( S. M
dio.js:121:47)" Y9 b( h, n% n4 c2 }: E
gyp ERR! stack at D:\rymcu\electron-serialport\node_modules\node-gyp\lib\find-visualstudio.js:74:16 C7 f. R' Z- g" f8 j3 ?5 f! I
gyp ERR! stack at D:\rymcu\electron-serialport\node_modules\node-gyp\lib\find-visualstudio.js:372:16
* q" n$ O4 B" W9 j4 x- fgyp ERR! stack at D:\rymcu\electron-serialport\node_modules\node-gyp\lib\util.js:54:7
9 {+ s; T& u. g: D7 Jgyp ERR! stack at D:\rymcu\electron-serialport\node_modules\node-gyp\lib\util.js:33:16
. v! L* T; D% p# jgyp ERR! stack at ChildProcess.exithandler (child_process.js:310:5); s/ ]+ G0 r. l W- B# |6 e& \
gyp ERR! stack at ChildProcess.emit (events.js:315:20)
8 C0 J1 x& b# V. Q1 N9 \gyp ERR! stack at maybeClose (internal/child_process.js:1021:16)
7 P- F/ K1 m- L+ S2 d' kgyp ERR! stack at Process.ChildProcess._handle.onexit (internal/child_process.js:286:5)
; O5 H; X. O8 M) ngyp ERR! System Windows_NT 10.0.15063 % i( @# ~) f+ m! M' K$ d) V+ l
( x+ R3 [8 e7 Y2 G: t0 g' ]' R c解决办法
# ?9 F4 B& s' T1、卸载nodejs重新安装一遍' V/ F) E2 P. c' I( J
5 j& E9 X6 O6 N, r7 O6 L7 e2、设置淘宝镜像 npm config set registry https://registry.npm.taobao.org
; R4 s# w" Y0 ^( f# v# C4 ~
! n! [; l. l, l7 F5 S3、安装nodejs所需的环境(Visual Studio XX、python什么鬼的),执行这个命令会自动检测并帮你安装好,npm install --g --production windows-build-tools; ^# L) T1 w( n6 R& x" @( j) L
————————————————
' s4 i b- U+ Y/ Z版权声明:本文为CSDN博主「一点一滴成长」的原创文章,遵循CC 4.0 BY-SA版权协议,转载请附上原文出处链接及本声明。
. v& _5 \- e/ v) U6 d原文链接:https://blog.csdn.net/qq_39946015/article/details/127351920 |
|