|
|
报错信息:. Q. E5 O) M# g( ^, Q
```bash
6 h7 x3 d6 ~$ T0 q6 P+ Tgyp ERR! find VS
& B& ^6 L- S1 a! |gyp ERR! find VS msvs_version not set from command line or npm config
w4 f7 O, d2 z/ l! tgyp ERR! find VS running in VS Command Prompt, installation path is:/ n/ |) G: @8 ~2 n1 }, ^
gyp ERR! find VS "C:\Program Files (x86)\Microsoft Visual Studio\2017"
. X* e9 R% q' |) R/ W& b, R& pgyp ERR! find VS - will only use this version
1 o( T- }2 P L5 k) `7 H2 jgyp ERR! find VS could not use PowerShell to find Visual Studio 2017 or newer1 {9 f! n; S3 P- g3 t$ X; P* b+ [) h
gyp ERR! find VS looking for Visual Studio 2015
$ {. T/ J# M) O5 i; Egyp ERR! find VS - not found
. z' r) g* I/ R j) e' v( Ngyp ERR! find VS looking for Visual Studio 2013
$ f% W2 Q3 d9 x ~- S( ~gyp ERR! find VS - not found
) U/ x0 E: t9 ]% cgyp ERR! find VS$ L5 G/ y& t% m' y) v8 r& w
gyp ERR! find VS ************************************************************** a. y& T7 L6 Z7 { _: {
gyp ERR! find VS You need to install the latest version of Visual Studio( B: Z; w6 G6 m
gyp ERR! find VS including the "Desktop development with C++" workload.4 w6 W# ~. P2 x0 S/ X- |
gyp ERR! find VS For more information consult the documentation at:
; G+ u l R( C/ ]( o! Ygyp ERR! find VS https://github.com/nodejs/node-gyp#on-windows& `' w! F0 z5 N# x5 H
gyp ERR! find VS **************************************************************& I* `# ?2 v+ Y% l% h
gyp ERR! find VS
2 |# z4 N+ M9 M: e) R; Ngyp ERR! configure error+ m: I' o0 h: r& P
gyp ERR! stack Error: Could not find any Visual Studio installation to use8 h; s$ y, u9 _+ @$ l- }
gyp ERR! stack at VisualStudioFinder.fail (D:\rymcu\electron-serialport\node_modules\node-gyp\lib\find-visualstu
1 K8 m2 p/ G6 ?5 |& J4 W* Cdio.js:121:47), x9 F1 i* _0 M# D+ u
gyp ERR! stack at D:\rymcu\electron-serialport\node_modules\node-gyp\lib\find-visualstudio.js:74:16+ U' c6 T1 t+ [( b+ N6 u* F
gyp ERR! stack at D:\rymcu\electron-serialport\node_modules\node-gyp\lib\find-visualstudio.js:372:162 v. V! ~: {: _
gyp ERR! stack at D:\rymcu\electron-serialport\node_modules\node-gyp\lib\util.js:54:7
8 ?6 A8 n, Q( k& R. v' b0 a/ u/ lgyp ERR! stack at D:\rymcu\electron-serialport\node_modules\node-gyp\lib\util.js:33:16
]3 f4 y! A7 \' Y6 bgyp ERR! stack at ChildProcess.exithandler (child_process.js:310:5)0 A6 g$ N" Z5 L
gyp ERR! stack at ChildProcess.emit (events.js:315:20)
* N: x7 d$ S7 k- C* Cgyp ERR! stack at maybeClose (internal/child_process.js:1021:16)
+ a9 G0 h( {. c& Z; p) t6 {gyp ERR! stack at Process.ChildProcess._handle.onexit (internal/child_process.js:286:5)) n7 f0 Y) y# ]' _5 N2 [9 n6 L/ E
gyp ERR! System Windows_NT 10.0.15063 3 L% g, G) k: S6 C# N
K& s2 u2 r: R) J5 n I解决办法
0 }. _/ h) U( O' X/ J1、卸载nodejs重新安装一遍
9 d5 R k! D1 C* s9 Y: W9 ~ y1 N! [3 }) n
2、设置淘宝镜像 npm config set registry https://registry.npm.taobao.org
' N8 ^7 P3 | o
6 c$ H) H$ [& f3、安装nodejs所需的环境(Visual Studio XX、python什么鬼的),执行这个命令会自动检测并帮你安装好,npm install --g --production windows-build-tools
8 I( O7 _4 L& p- ~/ n————————————————$ u% Z+ Q" N2 z' X7 q ^0 ]
版权声明:本文为CSDN博主「一点一滴成长」的原创文章,遵循CC 4.0 BY-SA版权协议,转载请附上原文出处链接及本声明。1 t# z' J1 C; Z9 o( q
原文链接:https://blog.csdn.net/qq_39946015/article/details/127351920 |
|