|
|
报错信息:. O3 ?' C3 Y) y* I6 h% s/ P
```bash
9 p9 L" y. u6 }6 e% e) Zgyp ERR! find VS
/ R2 J+ \" h1 A' h b8 |/ U7 m0 ]' Hgyp ERR! find VS msvs_version not set from command line or npm config
: Y F; ^# q2 \ w" }* k* ngyp ERR! find VS running in VS Command Prompt, installation path is:
3 X8 `5 _5 T0 h. m) W5 pgyp ERR! find VS "C:\Program Files (x86)\Microsoft Visual Studio\2017"
z% q. X* @3 s5 _. t7 ]- A5 ]gyp ERR! find VS - will only use this version
, T" ]- T. v! E& H, egyp ERR! find VS could not use PowerShell to find Visual Studio 2017 or newer
2 A. a2 C \4 B5 ]. o7 ugyp ERR! find VS looking for Visual Studio 2015$ {# L: e6 x6 q
gyp ERR! find VS - not found
" u% T- F9 c. F! g# x* Ogyp ERR! find VS looking for Visual Studio 2013% H! c8 ?/ y: d! e8 X4 o2 _' k+ u
gyp ERR! find VS - not found N6 i2 \+ R% }; O0 I% ?7 w, }5 L- s
gyp ERR! find VS7 \) K* C s! k0 x. V
gyp ERR! find VS ************************************************************** m' C& h( W: |9 |. b% u
gyp ERR! find VS You need to install the latest version of Visual Studio9 A; m" R9 K6 K6 D' Y1 j( L7 ^
gyp ERR! find VS including the "Desktop development with C++" workload.8 T* g6 l1 H2 ~* Z! r2 f" C; I
gyp ERR! find VS For more information consult the documentation at:2 u: V* F$ c8 y
gyp ERR! find VS https://github.com/nodejs/node-gyp#on-windows( s# s$ ?8 ^( l" T( {; O* }
gyp ERR! find VS **************************************************************
i1 \8 X1 y8 `: V' `# b/ Ngyp ERR! find VS7 _ X4 q/ w' ~) \4 K
gyp ERR! configure error
5 f9 }" Q0 h% h Q6 {: ~gyp ERR! stack Error: Could not find any Visual Studio installation to use
! u3 L( ^- E. ]2 _gyp ERR! stack at VisualStudioFinder.fail (D:\rymcu\electron-serialport\node_modules\node-gyp\lib\find-visualstu u9 ~2 X% y% V& a3 C6 J$ g
dio.js:121:47)
- P) c/ x9 }' \% a% n2 }* Igyp ERR! stack at D:\rymcu\electron-serialport\node_modules\node-gyp\lib\find-visualstudio.js:74:167 [9 J' |2 ]; s
gyp ERR! stack at D:\rymcu\electron-serialport\node_modules\node-gyp\lib\find-visualstudio.js:372:16
0 _! `5 D1 Y2 k, \( Tgyp ERR! stack at D:\rymcu\electron-serialport\node_modules\node-gyp\lib\util.js:54:7# m8 N$ X2 a6 \. d$ U
gyp ERR! stack at D:\rymcu\electron-serialport\node_modules\node-gyp\lib\util.js:33:167 _2 J4 S3 R4 s. F7 r
gyp ERR! stack at ChildProcess.exithandler (child_process.js:310:5)1 q( L( b4 A5 u. }$ d
gyp ERR! stack at ChildProcess.emit (events.js:315:20) e$ `& g+ @. [! V3 Q& X- ]8 Q7 s J
gyp ERR! stack at maybeClose (internal/child_process.js:1021:16)
; `8 {+ K( t$ G- {: kgyp ERR! stack at Process.ChildProcess._handle.onexit (internal/child_process.js:286:5); v4 T. ]& E$ S/ g& e" y& n- w
gyp ERR! System Windows_NT 10.0.15063 " \. t* c( [+ T0 D# C0 m2 F" k/ Y1 Z
8 Y U6 L% D. H
解决办法
0 j2 Q! ~4 w4 {6 ^) D" t+ |" h. u1、卸载nodejs重新安装一遍
2 J6 ~& U/ |: A: [" A$ T' D. z" U" Q$ o
2、设置淘宝镜像 npm config set registry https://registry.npm.taobao.org, a4 x* W& Y! H- _# Z8 ]
! ~; R8 z$ [& W) k- [3、安装nodejs所需的环境(Visual Studio XX、python什么鬼的),执行这个命令会自动检测并帮你安装好,npm install --g --production windows-build-tools
5 [% m6 z e5 {) c————————————————1 C+ |5 M- T+ ^) C. r2 O: O. W' ]
版权声明:本文为CSDN博主「一点一滴成长」的原创文章,遵循CC 4.0 BY-SA版权协议,转载请附上原文出处链接及本声明。. Y- D0 r: [1 `' j9 O& |: u
原文链接:https://blog.csdn.net/qq_39946015/article/details/127351920 |
|