|
|
报错信息:
# w9 e. R' E7 Q' U* @```bash
0 C6 W& {# ~4 I+ n8 @1 ^" ygyp ERR! find VS- T* y- J# Y; N/ Q
gyp ERR! find VS msvs_version not set from command line or npm config
7 E- M9 N+ H! F3 Q& c- [gyp ERR! find VS running in VS Command Prompt, installation path is:, P5 m! ?* \3 R5 u I
gyp ERR! find VS "C:\Program Files (x86)\Microsoft Visual Studio\2017"
1 T2 E8 v( G7 L* u! Agyp ERR! find VS - will only use this version
M5 i1 I: N* D2 h' {gyp ERR! find VS could not use PowerShell to find Visual Studio 2017 or newer( O, Z+ l6 g9 {" X7 N% [+ t
gyp ERR! find VS looking for Visual Studio 2015+ p7 M2 C G3 Q) V# V. \8 D
gyp ERR! find VS - not found
4 y' h9 i& K6 egyp ERR! find VS looking for Visual Studio 2013# q1 i& z# N' j- p# `7 U) h
gyp ERR! find VS - not found9 H8 U' E% G/ H1 U
gyp ERR! find VS
6 x# Q/ e U. p+ j% Tgyp ERR! find VS *************************************************************** |. q/ I2 H5 n# F+ p
gyp ERR! find VS You need to install the latest version of Visual Studio+ _' ~$ |9 R6 } V
gyp ERR! find VS including the "Desktop development with C++" workload.
; I1 k; x/ F& q7 Z3 ngyp ERR! find VS For more information consult the documentation at:9 k5 ?. ?: a' T( H
gyp ERR! find VS https://github.com/nodejs/node-gyp#on-windows1 L1 c- F' e0 M( X- k1 X. k! d, w4 J
gyp ERR! find VS **************************************************************
' Y9 y* S5 G6 U% ~8 Bgyp ERR! find VS
8 J8 \* J; j6 w: b: mgyp ERR! configure error
P0 h$ J8 J- D0 lgyp ERR! stack Error: Could not find any Visual Studio installation to use
- g8 L5 Z2 m6 o) S# M3 f8 D; Jgyp ERR! stack at VisualStudioFinder.fail (D:\rymcu\electron-serialport\node_modules\node-gyp\lib\find-visualstu
. b& y J8 Z- e! ~7 | ^5 C edio.js:121:47)3 T. z7 I! O+ w
gyp ERR! stack at D:\rymcu\electron-serialport\node_modules\node-gyp\lib\find-visualstudio.js:74:167 z$ O& u; q$ Q% e
gyp ERR! stack at D:\rymcu\electron-serialport\node_modules\node-gyp\lib\find-visualstudio.js:372:161 Q/ G; K+ n' a# B9 q- r8 d5 e
gyp ERR! stack at D:\rymcu\electron-serialport\node_modules\node-gyp\lib\util.js:54:7
6 k( p7 X: y! U7 R: v$ dgyp ERR! stack at D:\rymcu\electron-serialport\node_modules\node-gyp\lib\util.js:33:168 g/ R {/ p u( R& r
gyp ERR! stack at ChildProcess.exithandler (child_process.js:310:5)
4 Z% L* C Y: k6 @gyp ERR! stack at ChildProcess.emit (events.js:315:20)
& O: l. J4 \8 B6 \, r4 Hgyp ERR! stack at maybeClose (internal/child_process.js:1021:16), G+ r- Q& M$ l
gyp ERR! stack at Process.ChildProcess._handle.onexit (internal/child_process.js:286:5)
7 {8 }7 h% s$ l. t G3 vgyp ERR! System Windows_NT 10.0.15063 , _3 B" ] [7 N. J# ~
2 X5 p% N: i9 `( {: r解决办法
4 J% W( Q5 O; s& N1、卸载nodejs重新安装一遍
, i0 ]; m7 P4 B! A8 v. Z% ~% a
" {$ `! d8 }- Q. R2 T* B2、设置淘宝镜像 npm config set registry https://registry.npm.taobao.org
9 R0 H& @0 u# l: X
) V% X9 ^0 I7 _; h4 C+ i- _4 p, o: s3、安装nodejs所需的环境(Visual Studio XX、python什么鬼的),执行这个命令会自动检测并帮你安装好,npm install --g --production windows-build-tools7 e! S0 q- O; ~" E6 W
————————————————
, I# `8 m/ B- z/ ?) E) z) |8 [版权声明:本文为CSDN博主「一点一滴成长」的原创文章,遵循CC 4.0 BY-SA版权协议,转载请附上原文出处链接及本声明。
5 p% A5 Z- k# G$ c7 N4 K原文链接:https://blog.csdn.net/qq_39946015/article/details/127351920 |
|