|
|
报错信息:
9 ^: j& Q6 G+ a1 e# E```bash
9 a' {, g+ n9 i9 q3 c3 Sgyp ERR! find VS
, H6 B; t# r% h/ `( {gyp ERR! find VS msvs_version not set from command line or npm config9 {8 {: x# o: r4 j/ d4 m7 c' [
gyp ERR! find VS running in VS Command Prompt, installation path is:
! h$ r0 X, m) n5 V) b/ p2 }7 hgyp ERR! find VS "C:\Program Files (x86)\Microsoft Visual Studio\2017"5 L& `! R3 @0 ?- ]; q
gyp ERR! find VS - will only use this version
+ Q, ]' e! I! N/ K' W5 e9 o' Ngyp ERR! find VS could not use PowerShell to find Visual Studio 2017 or newer* P8 ], ~2 h' F
gyp ERR! find VS looking for Visual Studio 2015
; Z3 y6 F7 s ngyp ERR! find VS - not found' {/ B& W/ _- [3 D
gyp ERR! find VS looking for Visual Studio 2013+ G7 v; V( v) M7 i8 Q+ B: R
gyp ERR! find VS - not found, Y1 I& P$ x7 p0 ~
gyp ERR! find VS& l: _6 g! S6 t+ C
gyp ERR! find VS **************************************************************/ {# h9 P* X/ b
gyp ERR! find VS You need to install the latest version of Visual Studio
* U, C. Y- j0 Cgyp ERR! find VS including the "Desktop development with C++" workload.
, Z2 h) W3 N3 ^# h: ngyp ERR! find VS For more information consult the documentation at:' n* x S& y( o. ^
gyp ERR! find VS https://github.com/nodejs/node-gyp#on-windows
1 {5 K7 _* s' Y9 S; q) P) sgyp ERR! find VS **************************************************************
9 W' k: I7 N; R2 ~$ pgyp ERR! find VS9 S( |$ K V& {3 ^
gyp ERR! configure error- e& a+ i% K7 A: ^/ s
gyp ERR! stack Error: Could not find any Visual Studio installation to use7 V" E7 W! q# m1 k B/ o
gyp ERR! stack at VisualStudioFinder.fail (D:\rymcu\electron-serialport\node_modules\node-gyp\lib\find-visualstu
7 ?9 `( v" S1 W7 ^% v$ Wdio.js:121:47)
8 P# r! T6 d% i/ t W0 G0 qgyp ERR! stack at D:\rymcu\electron-serialport\node_modules\node-gyp\lib\find-visualstudio.js:74:160 |: }# M/ k. q; \3 ]
gyp ERR! stack at D:\rymcu\electron-serialport\node_modules\node-gyp\lib\find-visualstudio.js:372:16
9 S; N- Z8 O4 L. X3 Ngyp ERR! stack at D:\rymcu\electron-serialport\node_modules\node-gyp\lib\util.js:54:7# B! `) a5 j+ L8 z( f4 [9 x+ {
gyp ERR! stack at D:\rymcu\electron-serialport\node_modules\node-gyp\lib\util.js:33:16. @( {: W" f) W: X
gyp ERR! stack at ChildProcess.exithandler (child_process.js:310:5)
+ m0 y. ]9 g4 vgyp ERR! stack at ChildProcess.emit (events.js:315:20)2 ~0 J( B2 [! a9 f
gyp ERR! stack at maybeClose (internal/child_process.js:1021:16)
' v' j+ s* C. r. a& n9 O) P2 tgyp ERR! stack at Process.ChildProcess._handle.onexit (internal/child_process.js:286:5)
$ ` _+ T" L4 k* pgyp ERR! System Windows_NT 10.0.15063 ( O4 s( k$ U7 c5 S/ N9 K
& U' @$ _- ~% k: ]
解决办法! s- c9 g8 X; M3 C2 z
1、卸载nodejs重新安装一遍
- r8 T4 ]8 R3 W0 V {9 q5 R$ \) G$ V [4 ~9 x
2、设置淘宝镜像 npm config set registry https://registry.npm.taobao.org
7 }; c* Q7 A9 h4 l L* [8 g& X0 C3 ? B5 w; x% z
3、安装nodejs所需的环境(Visual Studio XX、python什么鬼的),执行这个命令会自动检测并帮你安装好,npm install --g --production windows-build-tools
) u$ i8 v; t! ]' a3 ?————————————————4 m( l8 R) m3 c4 i$ C
版权声明:本文为CSDN博主「一点一滴成长」的原创文章,遵循CC 4.0 BY-SA版权协议,转载请附上原文出处链接及本声明。- S% }6 V; P; s5 A# G( J
原文链接:https://blog.csdn.net/qq_39946015/article/details/127351920 |
|