|
|
报错信息:$ M6 W- W6 b" t2 [- h
```bash
+ g/ ^( U! `$ b& W/ |/ C& Ogyp ERR! find VS
; {1 `. I, K( X: L) V( tgyp ERR! find VS msvs_version not set from command line or npm config
: o/ a7 a2 U1 W/ V( Jgyp ERR! find VS running in VS Command Prompt, installation path is:
9 Q6 R$ L0 v2 ~+ @' z) xgyp ERR! find VS "C:\Program Files (x86)\Microsoft Visual Studio\2017"5 Z& B* c2 x1 A4 F5 N; w
gyp ERR! find VS - will only use this version2 g3 H* [, x- ^; x! a/ K
gyp ERR! find VS could not use PowerShell to find Visual Studio 2017 or newer
* u" F5 f# T5 O, w9 Ugyp ERR! find VS looking for Visual Studio 2015; @& a2 C! P4 S' z/ j# c6 \. _; a
gyp ERR! find VS - not found
- k$ `" a1 f) K+ Kgyp ERR! find VS looking for Visual Studio 2013
- d: |" G+ v6 X5 q; i8 qgyp ERR! find VS - not found, k0 T* q# l: g
gyp ERR! find VS7 x$ i' ?2 t+ r, Q$ J, G" ?$ D/ x
gyp ERR! find VS **************************************************************
! W$ I) F \% {( f" w5 `$ Zgyp ERR! find VS You need to install the latest version of Visual Studio
; O, o+ O8 J9 ~; [gyp ERR! find VS including the "Desktop development with C++" workload.0 b# a: S/ a& C3 j; ?" r k
gyp ERR! find VS For more information consult the documentation at:) [: ~; ^! Z9 u& g
gyp ERR! find VS https://github.com/nodejs/node-gyp#on-windows
6 O. J+ l# b' ]8 H, a2 Agyp ERR! find VS **************************************************************& x* F* d6 m7 H" [ ^3 V8 X
gyp ERR! find VS
- w: A3 n' r$ d6 J7 o8 f% ^5 |* Fgyp ERR! configure error. t) ~0 _0 a2 n
gyp ERR! stack Error: Could not find any Visual Studio installation to use' Z a7 j# J* P
gyp ERR! stack at VisualStudioFinder.fail (D:\rymcu\electron-serialport\node_modules\node-gyp\lib\find-visualstu. @- f0 z: a% C7 |. u2 U
dio.js:121:47)
/ _4 d. |5 J3 M# T# N" N1 Egyp ERR! stack at D:\rymcu\electron-serialport\node_modules\node-gyp\lib\find-visualstudio.js:74:16
& W: s$ V" p* `' H" P+ sgyp ERR! stack at D:\rymcu\electron-serialport\node_modules\node-gyp\lib\find-visualstudio.js:372:16
- U# Y4 H W3 q7 G5 zgyp ERR! stack at D:\rymcu\electron-serialport\node_modules\node-gyp\lib\util.js:54:7) z6 @" m: H* w) n
gyp ERR! stack at D:\rymcu\electron-serialport\node_modules\node-gyp\lib\util.js:33:16
8 Z" F" J: `3 c. q. Y) g' ~- Tgyp ERR! stack at ChildProcess.exithandler (child_process.js:310:5)2 ?! n8 c5 Z% \ A
gyp ERR! stack at ChildProcess.emit (events.js:315:20)
: {1 m: `3 t9 I" X- o! m* `gyp ERR! stack at maybeClose (internal/child_process.js:1021:16)2 T3 o6 ~- `- E! b) i4 a+ I
gyp ERR! stack at Process.ChildProcess._handle.onexit (internal/child_process.js:286:5)
, [/ S/ P" E) v- R- o: p, j, xgyp ERR! System Windows_NT 10.0.15063
- Q6 j6 b8 o) h/ A: Q
8 K5 d- e) @6 c+ V5 `解决办法
& z/ b. G! R0 O, @ s% I1、卸载nodejs重新安装一遍' m' l3 u4 g7 {/ L
( U, z( X) \: [, |# F/ ]$ ]
2、设置淘宝镜像 npm config set registry https://registry.npm.taobao.org( v1 d7 Y% a) [0 v
e! P) d2 O" {5 J# K3、安装nodejs所需的环境(Visual Studio XX、python什么鬼的),执行这个命令会自动检测并帮你安装好,npm install --g --production windows-build-tools
5 o# s r/ ?2 v+ y————————————————
8 H6 [ V5 V0 F版权声明:本文为CSDN博主「一点一滴成长」的原创文章,遵循CC 4.0 BY-SA版权协议,转载请附上原文出处链接及本声明。, l/ k1 i: K1 o# k' {
原文链接:https://blog.csdn.net/qq_39946015/article/details/127351920 |
|