|
|
报错信息:; V0 W1 _9 |9 }* F
```bash
. k; o) N6 \; v6 d' B% qgyp ERR! find VS
8 C R6 P; I4 M! [gyp ERR! find VS msvs_version not set from command line or npm config( R$ ^+ a4 R* j! A% K
gyp ERR! find VS running in VS Command Prompt, installation path is:
4 m5 s& e9 P+ j9 |gyp ERR! find VS "C:\Program Files (x86)\Microsoft Visual Studio\2017"
9 V/ K; O; k1 T% Ugyp ERR! find VS - will only use this version
% F* f, o7 s; U. U7 }: ~gyp ERR! find VS could not use PowerShell to find Visual Studio 2017 or newer
, u, f% a; {1 \9 k, I1 `gyp ERR! find VS looking for Visual Studio 20150 U( d" o3 `8 f* _7 D" i, O0 g
gyp ERR! find VS - not found
1 `, k% q/ n W! Vgyp ERR! find VS looking for Visual Studio 20139 n6 ?# Y1 P- N: r2 T2 z$ I
gyp ERR! find VS - not found! h0 D3 P# \, _! a! o
gyp ERR! find VS& B. i$ R5 a9 R0 F
gyp ERR! find VS **************************************************************. g# t; f' ?' U* n
gyp ERR! find VS You need to install the latest version of Visual Studio8 \. p: O, E ]: {2 a/ {
gyp ERR! find VS including the "Desktop development with C++" workload.8 V- P& W) T8 g
gyp ERR! find VS For more information consult the documentation at:
9 { r6 k* y m% C/ x; N( Egyp ERR! find VS https://github.com/nodejs/node-gyp#on-windows; ]) ~: w, u! _) G F" ~0 ]' Q9 A
gyp ERR! find VS **************************************************************; |0 d5 T9 |8 I9 h; C3 M; X1 y
gyp ERR! find VS
5 _$ ? G/ [9 D" Qgyp ERR! configure error. z2 b \ L6 X- n; W2 b
gyp ERR! stack Error: Could not find any Visual Studio installation to use' G6 Y5 a8 n/ _" J/ L
gyp ERR! stack at VisualStudioFinder.fail (D:\rymcu\electron-serialport\node_modules\node-gyp\lib\find-visualstu8 \7 s# `* A; \+ K+ t. x2 ? d
dio.js:121:47) E1 [9 ]. N+ P; n; D
gyp ERR! stack at D:\rymcu\electron-serialport\node_modules\node-gyp\lib\find-visualstudio.js:74:16
0 m% B$ w7 F0 {8 N5 u/ Ngyp ERR! stack at D:\rymcu\electron-serialport\node_modules\node-gyp\lib\find-visualstudio.js:372:165 A/ }! J2 B) H/ f
gyp ERR! stack at D:\rymcu\electron-serialport\node_modules\node-gyp\lib\util.js:54:7# c/ y2 d1 K/ ]- i, Y
gyp ERR! stack at D:\rymcu\electron-serialport\node_modules\node-gyp\lib\util.js:33:16! ?9 T* k: R8 i; x2 U, ~, o5 J. t
gyp ERR! stack at ChildProcess.exithandler (child_process.js:310:5)6 Z- o2 K+ i$ w
gyp ERR! stack at ChildProcess.emit (events.js:315:20)( m0 ~9 w0 ~9 P6 G
gyp ERR! stack at maybeClose (internal/child_process.js:1021:16)$ M+ j$ h* t: S$ ~* v u0 P
gyp ERR! stack at Process.ChildProcess._handle.onexit (internal/child_process.js:286:5)* \0 r: w* W X( G X
gyp ERR! System Windows_NT 10.0.15063 4 N _2 M2 Y j
8 l1 j0 n! ~6 }6 O$ M解决办法
+ ]( r I! r5 l4 g1、卸载nodejs重新安装一遍
& K j0 R: I; D* u9 H2 ?! A
3 {7 n& W& p8 b J. _9 g2、设置淘宝镜像 npm config set registry https://registry.npm.taobao.org
- |# U- J" z3 k, X" S+ f) I3 Y
% X {$ I& B7 Z) m! w3、安装nodejs所需的环境(Visual Studio XX、python什么鬼的),执行这个命令会自动检测并帮你安装好,npm install --g --production windows-build-tools
6 C/ S! p/ V7 [2 F6 X, y————————————————) h g& z/ R9 t* `
版权声明:本文为CSDN博主「一点一滴成长」的原创文章,遵循CC 4.0 BY-SA版权协议,转载请附上原文出处链接及本声明。
7 n3 G+ V% c) c原文链接:https://blog.csdn.net/qq_39946015/article/details/127351920 |
|