|
|
报错信息:
+ i0 @( c/ L: J: @; G% G```bash- E$ F" t( w$ C# s: G0 e4 s
gyp ERR! find VS* N5 a& C0 S! p! J# i. G
gyp ERR! find VS msvs_version not set from command line or npm config. g8 q4 ?3 u7 \5 i- \
gyp ERR! find VS running in VS Command Prompt, installation path is:( q3 B/ j3 n/ N* j7 R, \
gyp ERR! find VS "C:\Program Files (x86)\Microsoft Visual Studio\2017") d' J) r0 ]' A3 e. x
gyp ERR! find VS - will only use this version2 j# F3 K. ~2 u) _% |
gyp ERR! find VS could not use PowerShell to find Visual Studio 2017 or newer
R8 n8 y& W* R tgyp ERR! find VS looking for Visual Studio 20152 f3 g& A: p4 |( N, y1 O9 x2 j
gyp ERR! find VS - not found& ~8 |" ]5 H h! e& A( u- t- v9 }. q. @
gyp ERR! find VS looking for Visual Studio 2013) c$ v1 h) Z4 e2 m( a
gyp ERR! find VS - not found
" u+ y; ~! k0 V% Hgyp ERR! find VS1 q) a- b8 h" l* E9 R
gyp ERR! find VS **************************************************************
" v5 J5 c- Z% A2 [& a! ^gyp ERR! find VS You need to install the latest version of Visual Studio
* f3 f; l; \$ @( k+ hgyp ERR! find VS including the "Desktop development with C++" workload.
: u1 `/ G! ]2 sgyp ERR! find VS For more information consult the documentation at:4 V! u: q9 f3 R" |8 H0 k
gyp ERR! find VS https://github.com/nodejs/node-gyp#on-windows7 I% e- P2 f4 Z3 f# @$ m/ o
gyp ERR! find VS **************************************************************& G5 J: c9 b1 s) Q) z1 \6 D
gyp ERR! find VS
8 p; b$ m# g7 X% G6 K0 Bgyp ERR! configure error: ?1 [0 Y' }" p: ~: s# e
gyp ERR! stack Error: Could not find any Visual Studio installation to use: Q% F! N5 i- m1 m0 K
gyp ERR! stack at VisualStudioFinder.fail (D:\rymcu\electron-serialport\node_modules\node-gyp\lib\find-visualstu
$ D4 }( m1 k1 N- K9 A1 gdio.js:121:47)9 f9 ]0 H, `$ s8 L- l
gyp ERR! stack at D:\rymcu\electron-serialport\node_modules\node-gyp\lib\find-visualstudio.js:74:16
% _+ q7 v. H1 k, u; H6 [( dgyp ERR! stack at D:\rymcu\electron-serialport\node_modules\node-gyp\lib\find-visualstudio.js:372:160 u" m' h9 ]0 x% n" B$ q- a9 L
gyp ERR! stack at D:\rymcu\electron-serialport\node_modules\node-gyp\lib\util.js:54:7: O) d2 T) O4 ?4 ?2 u# v
gyp ERR! stack at D:\rymcu\electron-serialport\node_modules\node-gyp\lib\util.js:33:16
- T; _. A" ]8 e$ t( ygyp ERR! stack at ChildProcess.exithandler (child_process.js:310:5)3 b: |4 z. Y) w+ C9 O* [8 ?
gyp ERR! stack at ChildProcess.emit (events.js:315:20)
! I9 |3 p( K3 J" m) p- I% b/ Jgyp ERR! stack at maybeClose (internal/child_process.js:1021:16)4 U c( H/ _( M5 o
gyp ERR! stack at Process.ChildProcess._handle.onexit (internal/child_process.js:286:5)5 F2 E1 R8 s6 W! m j. E1 C
gyp ERR! System Windows_NT 10.0.15063 / M% _2 |4 f! N1 n; Q
l6 {, F n, ~1 \& Y E$ |& y解决办法 S9 |8 c+ b r$ u$ j9 U! q2 D: V
1、卸载nodejs重新安装一遍- }0 E* Q" l3 T9 ~3 P& m
7 C$ P6 Q( Z% \. x6 ]
2、设置淘宝镜像 npm config set registry https://registry.npm.taobao.org3 Y' j! k0 [/ D
3 ?; i9 O: p2 {$ N$ L3、安装nodejs所需的环境(Visual Studio XX、python什么鬼的),执行这个命令会自动检测并帮你安装好,npm install --g --production windows-build-tools
9 z4 M4 _7 r: U+ v1 E( C- u8 p————————————————4 A1 r _( X* } S% O9 \3 T8 B
版权声明:本文为CSDN博主「一点一滴成长」的原创文章,遵循CC 4.0 BY-SA版权协议,转载请附上原文出处链接及本声明。0 F! \6 ?4 w6 I' h
原文链接:https://blog.csdn.net/qq_39946015/article/details/127351920 |
|