|
|
报错信息:
* I' {/ C% M$ V% [( Y2 Y5 m4 e```bash
! A1 h2 m5 v/ \9 z# h7 d% cgyp ERR! find VS+ ^, Q1 C/ z9 `9 E7 I
gyp ERR! find VS msvs_version not set from command line or npm config7 v, t$ Q7 J) ?7 Z
gyp ERR! find VS running in VS Command Prompt, installation path is:( {1 ~" j: J- i" O
gyp ERR! find VS "C:\Program Files (x86)\Microsoft Visual Studio\2017"
8 |0 y9 S5 T7 |$ P. B% |gyp ERR! find VS - will only use this version+ R8 [6 Z7 A7 e1 B: D" H
gyp ERR! find VS could not use PowerShell to find Visual Studio 2017 or newer
4 {; J/ K# U; [2 _5 mgyp ERR! find VS looking for Visual Studio 2015
2 w' J0 G" m8 G5 @gyp ERR! find VS - not found
/ \" g4 `! i. W: F+ V" i) P9 @# }gyp ERR! find VS looking for Visual Studio 2013" G) x5 G$ D' R
gyp ERR! find VS - not found' h0 I! W5 N8 |# H/ j
gyp ERR! find VS
5 f/ _: q/ {9 j: _" y7 dgyp ERR! find VS **************************************************************
( y$ {$ a8 |7 u7 v% a" hgyp ERR! find VS You need to install the latest version of Visual Studio
$ V1 T, A8 S& C) x- x& e* |" Ggyp ERR! find VS including the "Desktop development with C++" workload.2 J1 E1 f* H6 b; w: B7 K* a
gyp ERR! find VS For more information consult the documentation at:' X! E; g1 s- V+ U! v: a0 s# a
gyp ERR! find VS https://github.com/nodejs/node-gyp#on-windows0 E6 X2 m. Q$ V& y: i9 a
gyp ERR! find VS **************************************************************2 w# o( B' N" {+ \: Y& ^, e% ?
gyp ERR! find VS
) }1 g- e$ q8 Y0 |- A; Mgyp ERR! configure error
6 h/ F: T) R) e* Tgyp ERR! stack Error: Could not find any Visual Studio installation to use
0 u8 L; C; K5 ~; j3 K4 Igyp ERR! stack at VisualStudioFinder.fail (D:\rymcu\electron-serialport\node_modules\node-gyp\lib\find-visualstu5 \5 ^/ c: c$ E) ~; Q9 G- f
dio.js:121:47)2 m! E* y, ~ {% B- d/ B
gyp ERR! stack at D:\rymcu\electron-serialport\node_modules\node-gyp\lib\find-visualstudio.js:74:16
0 h- Z9 n4 @" G8 ~6 [! rgyp ERR! stack at D:\rymcu\electron-serialport\node_modules\node-gyp\lib\find-visualstudio.js:372:16
7 R2 D0 x% n' @7 i# O! u2 f/ dgyp ERR! stack at D:\rymcu\electron-serialport\node_modules\node-gyp\lib\util.js:54:7
9 U7 T0 ?4 k4 { ?' C/ z( k" Igyp ERR! stack at D:\rymcu\electron-serialport\node_modules\node-gyp\lib\util.js:33:16 [4 u% K6 ~+ q3 a
gyp ERR! stack at ChildProcess.exithandler (child_process.js:310:5)5 f5 P8 Y8 I1 d' `3 U% r6 ?
gyp ERR! stack at ChildProcess.emit (events.js:315:20)
p9 ~* C/ }9 W9 Y. X% h( dgyp ERR! stack at maybeClose (internal/child_process.js:1021:16)7 M7 g3 B, s+ K
gyp ERR! stack at Process.ChildProcess._handle.onexit (internal/child_process.js:286:5)
& N0 l4 R8 y9 ^$ s* e* e) ]4 dgyp ERR! System Windows_NT 10.0.15063 % ]7 I- B% ~8 Y; U% F
' Q7 v8 @$ O" N$ j3 h9 I解决办法" g' q4 ~) E& J8 _2 R: `( ]
1、卸载nodejs重新安装一遍0 g' R6 `- _; w( [$ O$ l
4 G/ v; N- ?% x0 A2、设置淘宝镜像 npm config set registry https://registry.npm.taobao.org
$ J% r% y* g. ^3 T7 m6 t/ U; v
2 F, o0 d7 O* Q2 w2 Y3、安装nodejs所需的环境(Visual Studio XX、python什么鬼的),执行这个命令会自动检测并帮你安装好,npm install --g --production windows-build-tools) s9 I: h0 d0 o8 W! v+ y0 y
————————————————
5 T$ A7 R" W* d$ |) i* ?1 [1 o; E版权声明:本文为CSDN博主「一点一滴成长」的原创文章,遵循CC 4.0 BY-SA版权协议,转载请附上原文出处链接及本声明。
) p1 u) [6 Y; D, m m8 K原文链接:https://blog.csdn.net/qq_39946015/article/details/127351920 |
|