|
|
报错信息:
* c3 j6 D; @' ]4 x, j" c7 C```bash. Q& W6 h& n- F. `+ g8 {% N& h& W: t- |8 h8 O
gyp ERR! find VS, N% g& O: I0 r5 P! M& \* r8 d
gyp ERR! find VS msvs_version not set from command line or npm config
) g& p* I4 j* C' T/ Wgyp ERR! find VS running in VS Command Prompt, installation path is:
5 m" o! I5 N9 w) Ggyp ERR! find VS "C:\Program Files (x86)\Microsoft Visual Studio\2017"
; q8 ^ m ~0 p7 T5 F' {. `gyp ERR! find VS - will only use this version' }, B* u1 E. v( a
gyp ERR! find VS could not use PowerShell to find Visual Studio 2017 or newer7 z. Z0 J# P4 a8 k
gyp ERR! find VS looking for Visual Studio 2015
" _ k. }$ N& i5 l5 `3 d! E% z: bgyp ERR! find VS - not found
8 _! F1 @ B, Tgyp ERR! find VS looking for Visual Studio 20133 I( A ]8 l% d; `9 G; n0 c+ K
gyp ERR! find VS - not found
% S d1 ?' u% C, V* i5 ]7 Mgyp ERR! find VS
9 ^9 ?6 v/ N/ V8 hgyp ERR! find VS **************************************************************
- g, K- b; Q, Q% O9 _$ N. q! cgyp ERR! find VS You need to install the latest version of Visual Studio0 E* ?+ x) A* M% j
gyp ERR! find VS including the "Desktop development with C++" workload.$ d# m; w) y" }1 ~" R
gyp ERR! find VS For more information consult the documentation at:
2 s1 U3 ^8 _3 k/ m3 o$ kgyp ERR! find VS https://github.com/nodejs/node-gyp#on-windows
; X( b+ [- W0 W3 x) ]# ^gyp ERR! find VS **************************************************************
) b( u$ m2 C& u Q: @* t$ Cgyp ERR! find VS
' x2 ?: G; Y! d) V# u7 |( S9 F( n9 v2 ]" vgyp ERR! configure error# G! A0 x8 |, m1 B4 \8 F: W9 q
gyp ERR! stack Error: Could not find any Visual Studio installation to use6 n* t O5 ^: U% V- R ^- |3 J8 W3 n
gyp ERR! stack at VisualStudioFinder.fail (D:\rymcu\electron-serialport\node_modules\node-gyp\lib\find-visualstu/ Q2 g; l1 `/ q' W" [; m8 n& T0 c" T
dio.js:121:47)
, p* e3 G# m( S- N Q' dgyp ERR! stack at D:\rymcu\electron-serialport\node_modules\node-gyp\lib\find-visualstudio.js:74:165 C3 \3 U" C% K, n7 i( H: F
gyp ERR! stack at D:\rymcu\electron-serialport\node_modules\node-gyp\lib\find-visualstudio.js:372:16
% {# y0 }, ^+ A' Ggyp ERR! stack at D:\rymcu\electron-serialport\node_modules\node-gyp\lib\util.js:54:7
! @0 T) l2 Y E% d8 agyp ERR! stack at D:\rymcu\electron-serialport\node_modules\node-gyp\lib\util.js:33:160 b3 ?& t A4 M
gyp ERR! stack at ChildProcess.exithandler (child_process.js:310:5)
5 u3 S* v- K T+ i. |gyp ERR! stack at ChildProcess.emit (events.js:315:20)2 u' i6 M" ?% d9 N
gyp ERR! stack at maybeClose (internal/child_process.js:1021:16)* f6 K9 D+ o' |/ r3 }, d
gyp ERR! stack at Process.ChildProcess._handle.onexit (internal/child_process.js:286:5)
4 E9 o/ _! K% `4 q2 g. x5 `! Z5 L3 Dgyp ERR! System Windows_NT 10.0.15063
) D6 a J' R3 x8 z" r2 T% `0 O
& V7 ?3 g4 ]3 n9 c解决办法; K8 f' F) k, L" ?
1、卸载nodejs重新安装一遍& M2 k- A2 O' a8 M
7 d7 w" C2 Z/ V2、设置淘宝镜像 npm config set registry https://registry.npm.taobao.org( d& C- H0 U4 h9 i/ f8 S, Y7 a, k
% ^& A: y6 B4 \3、安装nodejs所需的环境(Visual Studio XX、python什么鬼的),执行这个命令会自动检测并帮你安装好,npm install --g --production windows-build-tools" w x& b0 b: F3 `/ p# e
————————————————4 E1 Y9 C& V( b6 c7 @5 I4 p$ }' n# n
版权声明:本文为CSDN博主「一点一滴成长」的原创文章,遵循CC 4.0 BY-SA版权协议,转载请附上原文出处链接及本声明。
9 H3 h8 T: n% y5 U原文链接:https://blog.csdn.net/qq_39946015/article/details/127351920 |
|