|
|
报错信息:
0 ?4 ?, \5 J7 A j9 b3 p```bash, g8 C/ G, j4 z; j
gyp ERR! find VS
. E! m) W" `* C0 I( h: Y. i; m5 Mgyp ERR! find VS msvs_version not set from command line or npm config+ u' b S! s( K5 t2 `' r
gyp ERR! find VS running in VS Command Prompt, installation path is:5 S3 k1 Q' D& o. U0 F$ h) k! |; q* y
gyp ERR! find VS "C:\Program Files (x86)\Microsoft Visual Studio\2017"' d! I' o4 u7 z3 q: v; A" K
gyp ERR! find VS - will only use this version
# j+ g3 f5 U8 {gyp ERR! find VS could not use PowerShell to find Visual Studio 2017 or newer
/ y# R& ~: y& s' mgyp ERR! find VS looking for Visual Studio 2015' A4 w/ X' C5 O5 x- c! v& P$ ?/ e5 ^
gyp ERR! find VS - not found- w' t% B6 Y6 Q! r
gyp ERR! find VS looking for Visual Studio 2013
a: n/ ~. N. }9 _- rgyp ERR! find VS - not found- J( X$ k& S* ^
gyp ERR! find VS
. |5 g2 x1 i2 Kgyp ERR! find VS **************************************************************
5 `2 P. \2 @, I. |3 B& U# J8 f% i1 xgyp ERR! find VS You need to install the latest version of Visual Studio
" Y/ }: y2 w" r+ e4 A: Y) Z$ J. Agyp ERR! find VS including the "Desktop development with C++" workload.( B" x$ o+ @+ T: p3 r; b
gyp ERR! find VS For more information consult the documentation at:
9 Y, F# `+ X' F" h( L/ j. ~gyp ERR! find VS https://github.com/nodejs/node-gyp#on-windows
) v7 W7 ?( V, f- C! g5 W/ I5 X1 {! |gyp ERR! find VS **************************************************************7 W1 G4 o3 Q( S1 [ ~2 ?
gyp ERR! find VS0 |$ [2 k, O; U) `) j, ?
gyp ERR! configure error h$ A9 a% F/ |; A' Q
gyp ERR! stack Error: Could not find any Visual Studio installation to use
3 a0 X* ~0 h ~1 N' M# Sgyp ERR! stack at VisualStudioFinder.fail (D:\rymcu\electron-serialport\node_modules\node-gyp\lib\find-visualstu3 S) \" T$ Q% @- X: u
dio.js:121:47)$ j* ]' w2 a# X6 A& p
gyp ERR! stack at D:\rymcu\electron-serialport\node_modules\node-gyp\lib\find-visualstudio.js:74:16# U* t5 M6 h7 Z* k+ i
gyp ERR! stack at D:\rymcu\electron-serialport\node_modules\node-gyp\lib\find-visualstudio.js:372:16
. o. [' e! r* w5 ?2 ?8 i9 {gyp ERR! stack at D:\rymcu\electron-serialport\node_modules\node-gyp\lib\util.js:54:75 o5 D: I+ H% N6 T
gyp ERR! stack at D:\rymcu\electron-serialport\node_modules\node-gyp\lib\util.js:33:16
5 [& v2 W1 ~; E. B1 ]5 {4 E% D2 igyp ERR! stack at ChildProcess.exithandler (child_process.js:310:5)
% {8 C4 x, g, X4 k: b- ugyp ERR! stack at ChildProcess.emit (events.js:315:20)$ k c3 b+ v( \9 G9 H: C3 `8 `' o
gyp ERR! stack at maybeClose (internal/child_process.js:1021:16)/ `7 o8 y4 b- ]! n7 o
gyp ERR! stack at Process.ChildProcess._handle.onexit (internal/child_process.js:286:5)& P3 Y# g9 w; a' E9 f" ^( D
gyp ERR! System Windows_NT 10.0.15063 * c& t9 A, U: ~" N+ g8 |
) ^& I- n" k! v: t% x! G
解决办法# z" w2 B4 y8 M' j8 t1 K3 `) r
1、卸载nodejs重新安装一遍
8 [ i0 I" R& I" y
1 t' ^3 b* W0 Q9 L9 C2、设置淘宝镜像 npm config set registry https://registry.npm.taobao.org
, V" e1 \5 j; U
, K- e& @' c: t4 U/ m' _3 I# y$ L3、安装nodejs所需的环境(Visual Studio XX、python什么鬼的),执行这个命令会自动检测并帮你安装好,npm install --g --production windows-build-tools* m9 s6 j q: ], T3 ~( _
————————————————
1 B A/ M7 m9 k版权声明:本文为CSDN博主「一点一滴成长」的原创文章,遵循CC 4.0 BY-SA版权协议,转载请附上原文出处链接及本声明。
/ A n8 b' l+ }6 U- F4 _: |原文链接:https://blog.csdn.net/qq_39946015/article/details/127351920 |
|