|
报错信息: d% M) C9 G; y5 ]
```bash. U. u6 O4 l9 d4 C, g4 O7 J
gyp ERR! find VS/ k; u. d; V8 }" y
gyp ERR! find VS msvs_version not set from command line or npm config5 a3 W. m! v3 x+ [) x
gyp ERR! find VS running in VS Command Prompt, installation path is:* S/ j$ X/ ~- @1 ` n& q
gyp ERR! find VS "C:\Program Files (x86)\Microsoft Visual Studio\2017"
4 j5 [. G; ]$ a) `6 F6 V0 Kgyp ERR! find VS - will only use this version
+ F. p( T7 p, Z, D2 vgyp ERR! find VS could not use PowerShell to find Visual Studio 2017 or newer' u* ?! k: T9 c
gyp ERR! find VS looking for Visual Studio 2015
, m' h$ [' c* w; P( {gyp ERR! find VS - not found
& v) r5 Z3 x. vgyp ERR! find VS looking for Visual Studio 20137 n, P( I0 f0 k' c) o& ^
gyp ERR! find VS - not found
1 e) |0 I4 X3 G; ?0 [1 T" W0 Cgyp ERR! find VS; `; K6 z: t1 J7 ?2 E
gyp ERR! find VS ************************************************************** C0 O( ^4 m* {/ _7 U
gyp ERR! find VS You need to install the latest version of Visual Studio
2 x& M$ O! ]" ]+ e6 t; R% Dgyp ERR! find VS including the "Desktop development with C++" workload.. _6 u7 J J/ N/ x! R* T& N) f8 A4 i
gyp ERR! find VS For more information consult the documentation at:
- W* _7 R$ c" ? mgyp ERR! find VS https://github.com/nodejs/node-gyp#on-windows0 ~% O, m9 ~# A! N: U5 Z( D
gyp ERR! find VS **************************************************************
Y8 i6 `/ a) agyp ERR! find VS
$ p `$ x4 o# Ygyp ERR! configure error ]$ f' }, v2 e% d
gyp ERR! stack Error: Could not find any Visual Studio installation to use
8 M& d4 Y1 _* rgyp ERR! stack at VisualStudioFinder.fail (D:\rymcu\electron-serialport\node_modules\node-gyp\lib\find-visualstu
+ a& W! u' v8 ~0 R. n, C* y! a0 Odio.js:121:47)" F7 M/ ?! g: `# l9 ?8 d; e) T
gyp ERR! stack at D:\rymcu\electron-serialport\node_modules\node-gyp\lib\find-visualstudio.js:74:16
$ ]3 o, U+ z L* } }; Fgyp ERR! stack at D:\rymcu\electron-serialport\node_modules\node-gyp\lib\find-visualstudio.js:372:16
% ^& @( e. H- ]5 P( g# ~gyp ERR! stack at D:\rymcu\electron-serialport\node_modules\node-gyp\lib\util.js:54:7- y+ x ?$ n4 n) o
gyp ERR! stack at D:\rymcu\electron-serialport\node_modules\node-gyp\lib\util.js:33:16! N: m5 n. f& P5 X
gyp ERR! stack at ChildProcess.exithandler (child_process.js:310:5). [9 D9 }9 V1 ]/ x. r
gyp ERR! stack at ChildProcess.emit (events.js:315:20)1 w/ h' U- z; z9 B
gyp ERR! stack at maybeClose (internal/child_process.js:1021:16)
: ]4 K( y4 b5 Ngyp ERR! stack at Process.ChildProcess._handle.onexit (internal/child_process.js:286:5)& y0 `9 S5 t [$ h6 h. D
gyp ERR! System Windows_NT 10.0.15063
4 b5 g$ [. l! f2 [: J! {2 Y) S. l8 K0 _1 q) r' H
解决办法
7 X6 I3 a' R% M- D% E' j) @1、卸载nodejs重新安装一遍
6 i" u: O' i8 ]$ [: [
2 M& m$ o) o. @9 \- i2、设置淘宝镜像 npm config set registry https://registry.npm.taobao.org/ Y! A; B- [8 u9 _/ L+ A
3 I( W/ ?) \! u3、安装nodejs所需的环境(Visual Studio XX、python什么鬼的),执行这个命令会自动检测并帮你安装好,npm install --g --production windows-build-tools+ x" ^. z1 g" x* r
————————————————
0 v9 |- L; q; ]" @ @" d, C版权声明:本文为CSDN博主「一点一滴成长」的原创文章,遵循CC 4.0 BY-SA版权协议,转载请附上原文出处链接及本声明。
; e/ l& D' w6 l原文链接:https://blog.csdn.net/qq_39946015/article/details/127351920 |
|