|
|
报错信息:# t; G) R, S5 X5 y9 Z `# a& k& v
```bash$ E4 _5 N/ T$ t7 Z% ~% a; z
gyp ERR! find VS9 y& z E+ E: }& X5 {/ t
gyp ERR! find VS msvs_version not set from command line or npm config+ ^2 _+ L- j7 i5 A# w. `- H8 r
gyp ERR! find VS running in VS Command Prompt, installation path is:
0 j* X- |7 K5 I2 o* D* Z) f1 Y7 kgyp ERR! find VS "C:\Program Files (x86)\Microsoft Visual Studio\2017") C+ {! \( r+ t S" R
gyp ERR! find VS - will only use this version4 x. Y8 K* [0 ]5 i5 W' z: h: D
gyp ERR! find VS could not use PowerShell to find Visual Studio 2017 or newer! s/ B! y' {$ _$ q
gyp ERR! find VS looking for Visual Studio 2015
& M( ~' P+ \ i+ d7 Dgyp ERR! find VS - not found' c' B5 C" f3 l& i( b8 V3 l- |
gyp ERR! find VS looking for Visual Studio 2013
+ F; o; D7 G' ]gyp ERR! find VS - not found, r% C# L, H: x9 `4 D/ F2 x3 c
gyp ERR! find VS
( {! }7 ~! d1 Zgyp ERR! find VS **************************************************************9 U {9 `1 w9 E: l, J4 p
gyp ERR! find VS You need to install the latest version of Visual Studio3 x1 I" c( d' m' P% M! p
gyp ERR! find VS including the "Desktop development with C++" workload." m9 G+ P1 u o3 r3 o. a1 m: N
gyp ERR! find VS For more information consult the documentation at:* m3 Z2 s1 ]! h
gyp ERR! find VS https://github.com/nodejs/node-gyp#on-windows4 j; l$ U W0 m" x+ L* J6 L
gyp ERR! find VS **************************************************************7 t; N0 T2 V( |) u& |3 c0 O% C
gyp ERR! find VS5 f. T2 F; C( a1 ?8 z
gyp ERR! configure error
8 N! x* J4 I5 ~7 pgyp ERR! stack Error: Could not find any Visual Studio installation to use, M6 r5 W5 s4 A( d, U- e; S
gyp ERR! stack at VisualStudioFinder.fail (D:\rymcu\electron-serialport\node_modules\node-gyp\lib\find-visualstu
- D* h/ g! D6 f1 c, y( F5 Ndio.js:121:47): V- Y8 k: `5 |" b w$ B7 E& V' w
gyp ERR! stack at D:\rymcu\electron-serialport\node_modules\node-gyp\lib\find-visualstudio.js:74:16
d8 m; j5 K* I+ q5 W3 Ugyp ERR! stack at D:\rymcu\electron-serialport\node_modules\node-gyp\lib\find-visualstudio.js:372:16& Z) |7 d- |% Z# |) u
gyp ERR! stack at D:\rymcu\electron-serialport\node_modules\node-gyp\lib\util.js:54:7
# m* a/ @, ~9 @; @/ ~gyp ERR! stack at D:\rymcu\electron-serialport\node_modules\node-gyp\lib\util.js:33:164 U, {: Y7 u4 h3 `
gyp ERR! stack at ChildProcess.exithandler (child_process.js:310:5)
' C6 a# y5 b/ B; `. [/ s6 Vgyp ERR! stack at ChildProcess.emit (events.js:315:20)& f8 Z w: \* o' |+ Y6 S2 I, h
gyp ERR! stack at maybeClose (internal/child_process.js:1021:16)
0 q2 Y% Q% H5 X4 D( E( k) lgyp ERR! stack at Process.ChildProcess._handle.onexit (internal/child_process.js:286:5). S+ G2 l4 o7 p0 H+ j! T
gyp ERR! System Windows_NT 10.0.15063
; C E& f C) P( g7 F/ v' @
$ b, y% [" C# b0 \& O( W( a5 K% c解决办法
3 D* v9 s+ m0 V% U' l* j1、卸载nodejs重新安装一遍
. F9 }- g3 V1 x# N7 u* K, Q, N+ ^7 ~. r, x( H
2、设置淘宝镜像 npm config set registry https://registry.npm.taobao.org. h6 E+ V) z* T( e; b- s8 I
# K% F" b v" q7 a3、安装nodejs所需的环境(Visual Studio XX、python什么鬼的),执行这个命令会自动检测并帮你安装好,npm install --g --production windows-build-tools
, c0 I- @$ c7 B" Y' d+ |————————————————
% G$ K8 L( ?+ y5 e9 d; S$ L版权声明:本文为CSDN博主「一点一滴成长」的原创文章,遵循CC 4.0 BY-SA版权协议,转载请附上原文出处链接及本声明。
' ?1 i( w' ]3 P原文链接:https://blog.csdn.net/qq_39946015/article/details/127351920 |
|