|
|
报错信息:
# P% i2 i; F! i```bash
/ ^3 ^3 B6 d H" o) n( zgyp ERR! find VS, v. u1 G1 M. F( s |
gyp ERR! find VS msvs_version not set from command line or npm config
5 y! O: f. R/ g; S* V" z6 a0 [gyp ERR! find VS running in VS Command Prompt, installation path is:
' ^# X7 d9 N) u2 n# j" J: u8 ~gyp ERR! find VS "C:\Program Files (x86)\Microsoft Visual Studio\2017"
0 Y0 n, U7 [8 x$ {6 Mgyp ERR! find VS - will only use this version
# G. U! B% N8 Z* C/ U- Wgyp ERR! find VS could not use PowerShell to find Visual Studio 2017 or newer; M9 b. K( G3 }0 ?% ~
gyp ERR! find VS looking for Visual Studio 2015/ P% a7 K4 r; y- Z
gyp ERR! find VS - not found
8 i* E% O! u/ w2 d1 e& P: Fgyp ERR! find VS looking for Visual Studio 2013" F: ^& V, Z: M
gyp ERR! find VS - not found
: Y( ?! z: a3 N, r1 I! g& Hgyp ERR! find VS) m( t" K- T) D! s0 J7 c ~
gyp ERR! find VS **************************************************************2 B$ ]% U& R V/ H" e
gyp ERR! find VS You need to install the latest version of Visual Studio
: M' z! Z* K# d7 Egyp ERR! find VS including the "Desktop development with C++" workload. a/ B* G, w' w D6 h
gyp ERR! find VS For more information consult the documentation at:
# g- M) B, }1 o3 d, H* sgyp ERR! find VS https://github.com/nodejs/node-gyp#on-windows
/ Q- V. I& p" ~0 q3 qgyp ERR! find VS ************************************************************** a% e6 _; N( J4 }3 s8 N
gyp ERR! find VS
1 Q5 T' d0 e) f$ dgyp ERR! configure error
1 y& o( R3 D$ I, ^6 Tgyp ERR! stack Error: Could not find any Visual Studio installation to use
/ l/ n5 _/ P c+ J. [' agyp ERR! stack at VisualStudioFinder.fail (D:\rymcu\electron-serialport\node_modules\node-gyp\lib\find-visualstu" H8 B0 d4 w3 T1 K# z3 N+ J
dio.js:121:47)% M6 i6 p0 q/ m: a6 {$ S |
gyp ERR! stack at D:\rymcu\electron-serialport\node_modules\node-gyp\lib\find-visualstudio.js:74:16- S( j9 V$ {# E( q
gyp ERR! stack at D:\rymcu\electron-serialport\node_modules\node-gyp\lib\find-visualstudio.js:372:16
% Q1 s: h* j ~4 b5 S% Tgyp ERR! stack at D:\rymcu\electron-serialport\node_modules\node-gyp\lib\util.js:54:7$ s+ ~& z [: ^( C1 U* @
gyp ERR! stack at D:\rymcu\electron-serialport\node_modules\node-gyp\lib\util.js:33:16
! }1 [! z9 C# t j- }7 K6 u4 Ogyp ERR! stack at ChildProcess.exithandler (child_process.js:310:5)
" ]: ?4 Q! t5 K4 t" a$ Q' O) Bgyp ERR! stack at ChildProcess.emit (events.js:315:20)8 g9 b" v- r5 w9 V, a5 W+ _/ F( F
gyp ERR! stack at maybeClose (internal/child_process.js:1021:16)
( ~7 G Y( W( ~. ]+ t& z- f8 B- i- ~gyp ERR! stack at Process.ChildProcess._handle.onexit (internal/child_process.js:286:5)
- t# U+ W' l3 F/ ]7 Ogyp ERR! System Windows_NT 10.0.15063 2 N3 W6 Q, N" r- `2 R# m+ N
8 f. R! A& p: \7 I, q解决办法
+ A: N: p( u, b1、卸载nodejs重新安装一遍
, O) P8 [/ K4 m7 x5 m! f/ S$ t) M+ x; e9 [
2、设置淘宝镜像 npm config set registry https://registry.npm.taobao.org! L: `4 t6 A5 Y: N" r
9 {. a0 ^8 s) b# G1 h& ^
3、安装nodejs所需的环境(Visual Studio XX、python什么鬼的),执行这个命令会自动检测并帮你安装好,npm install --g --production windows-build-tools
$ T" k' f7 a% k1 L) M( }. g————————————————
1 U4 k2 r/ U# N% ^4 O7 [. ~版权声明:本文为CSDN博主「一点一滴成长」的原创文章,遵循CC 4.0 BY-SA版权协议,转载请附上原文出处链接及本声明。0 M% @0 b8 w# T2 N
原文链接:https://blog.csdn.net/qq_39946015/article/details/127351920 |
|