|
|
报错信息:1 `: J* j0 E1 e) p' y
```bash
8 S, }. q! b# F& ]gyp ERR! find VS1 W5 F' n5 {0 v2 R2 h
gyp ERR! find VS msvs_version not set from command line or npm config! z; a7 ^; `+ z
gyp ERR! find VS running in VS Command Prompt, installation path is:
. m; W+ x; c& b4 m, @7 Q# x( i1 Egyp ERR! find VS "C:\Program Files (x86)\Microsoft Visual Studio\2017") a( u& D3 u) c1 Q
gyp ERR! find VS - will only use this version
; [5 X( F* |/ W# h8 S8 fgyp ERR! find VS could not use PowerShell to find Visual Studio 2017 or newer
5 O: c4 M$ C; Hgyp ERR! find VS looking for Visual Studio 2015: k" u6 |0 n' p$ x* D* [
gyp ERR! find VS - not found. i7 z7 d2 W; t" c
gyp ERR! find VS looking for Visual Studio 20139 q( w+ P: Z7 }$ @5 Q% G
gyp ERR! find VS - not found7 K; O9 ~2 J( z, C
gyp ERR! find VS' G0 L- S) U- R5 i9 n$ N1 V' e2 Q
gyp ERR! find VS **************************************************************# s" t, u, g7 ?8 G
gyp ERR! find VS You need to install the latest version of Visual Studio
1 d9 |! M, ?+ ^5 Ogyp ERR! find VS including the "Desktop development with C++" workload.: p1 b4 J1 s' s: ^6 d+ ~
gyp ERR! find VS For more information consult the documentation at:6 D8 r* K0 ^$ o& G6 R" e
gyp ERR! find VS https://github.com/nodejs/node-gyp#on-windows4 W, @' Q' u. v7 j1 m$ D2 r4 S$ [
gyp ERR! find VS **************************************************************
, C6 h1 l& c7 d6 p$ |: }' S: Bgyp ERR! find VS/ s8 Q/ P0 {3 C9 C4 s9 w
gyp ERR! configure error) p4 i; M3 x/ x
gyp ERR! stack Error: Could not find any Visual Studio installation to use
& _0 T% B9 p% X) Vgyp ERR! stack at VisualStudioFinder.fail (D:\rymcu\electron-serialport\node_modules\node-gyp\lib\find-visualstu
* v1 e$ E* Z6 W6 K3 c6 Y, x) `dio.js:121:47)
" C* c7 x$ E3 w- W3 }% _gyp ERR! stack at D:\rymcu\electron-serialport\node_modules\node-gyp\lib\find-visualstudio.js:74:16
* M1 e1 J8 _. [' k( Egyp ERR! stack at D:\rymcu\electron-serialport\node_modules\node-gyp\lib\find-visualstudio.js:372:16
: ?% J. V# ?4 o; z. A) Tgyp ERR! stack at D:\rymcu\electron-serialport\node_modules\node-gyp\lib\util.js:54:7. i8 l3 ~; S4 J# K1 M* l
gyp ERR! stack at D:\rymcu\electron-serialport\node_modules\node-gyp\lib\util.js:33:163 a' L- w {3 N' r! f
gyp ERR! stack at ChildProcess.exithandler (child_process.js:310:5)
& z% Z7 W6 I: U3 p: ugyp ERR! stack at ChildProcess.emit (events.js:315:20)
- J1 D" d4 t5 c k2 ] t1 Tgyp ERR! stack at maybeClose (internal/child_process.js:1021:16)
7 q- k ]/ k5 A+ w- N0 |gyp ERR! stack at Process.ChildProcess._handle.onexit (internal/child_process.js:286:5)/ X0 U: H q/ N9 F; y
gyp ERR! System Windows_NT 10.0.15063 , S) U- q* S+ S4 H
4 O; F! ?! R, z# n解决办法
- i! F' h$ I1 ?. x* G- P1、卸载nodejs重新安装一遍; Y$ k$ H' e+ m! Z3 z
1 c& p' w( m) K6 m' G
2、设置淘宝镜像 npm config set registry https://registry.npm.taobao.org+ z$ _6 }) d* J3 \. c$ r* w+ a
% a. [7 T' E# _! o d
3、安装nodejs所需的环境(Visual Studio XX、python什么鬼的),执行这个命令会自动检测并帮你安装好,npm install --g --production windows-build-tools
9 t0 Z* D! u) \) R————————————————+ R% @3 Q A& J! ~+ U9 Q2 t
版权声明:本文为CSDN博主「一点一滴成长」的原创文章,遵循CC 4.0 BY-SA版权协议,转载请附上原文出处链接及本声明。
5 c5 y3 Z8 A' }) h' J原文链接:https://blog.csdn.net/qq_39946015/article/details/127351920 |
|