|
|
报错信息:
: }( q) N% t8 {```bash
% t0 h* _) ]; _+ P! A5 b$ w4 ngyp ERR! find VS
( M$ t1 b g' v. M0 }9 ?! Ygyp ERR! find VS msvs_version not set from command line or npm config2 }% }6 z- f! m! [) L
gyp ERR! find VS running in VS Command Prompt, installation path is:
@ B4 Z- b3 @- }gyp ERR! find VS "C:\Program Files (x86)\Microsoft Visual Studio\2017"0 H S, b* _: R' c k% T
gyp ERR! find VS - will only use this version
& Y5 \' N- O/ R9 H- h' y, dgyp ERR! find VS could not use PowerShell to find Visual Studio 2017 or newer
) q& a& |) v5 L$ R) x& y! kgyp ERR! find VS looking for Visual Studio 20158 u0 ~) z$ S B7 g, k
gyp ERR! find VS - not found
$ P' f2 W( e* vgyp ERR! find VS looking for Visual Studio 2013
" i) f: v8 m8 h# e+ J/ Fgyp ERR! find VS - not found, ~+ X7 v( k9 c( z
gyp ERR! find VS
6 b1 W, D3 @! U, Z6 b/ f6 lgyp ERR! find VS **************************************************************9 n* g" a0 N5 }" v
gyp ERR! find VS You need to install the latest version of Visual Studio
6 }' x( M, j6 t/ t# ~gyp ERR! find VS including the "Desktop development with C++" workload.
F: ^5 ]4 ]7 \. z3 @8 Z" @: agyp ERR! find VS For more information consult the documentation at:+ Y2 _' b3 w( u5 \
gyp ERR! find VS https://github.com/nodejs/node-gyp#on-windows
L3 M+ ~7 [$ W$ m- ]+ H) s% @gyp ERR! find VS **************************************************************
$ p8 @1 V+ ?' u2 m% hgyp ERR! find VS
8 Q+ H4 M- g' {/ q# Bgyp ERR! configure error
/ X3 _; h2 H$ f6 Q# g" Qgyp ERR! stack Error: Could not find any Visual Studio installation to use4 b" s! r2 g# a
gyp ERR! stack at VisualStudioFinder.fail (D:\rymcu\electron-serialport\node_modules\node-gyp\lib\find-visualstu
6 X4 J2 |5 o" X$ I. A- qdio.js:121:47)
1 O5 ~) Q2 P' H6 G: Egyp ERR! stack at D:\rymcu\electron-serialport\node_modules\node-gyp\lib\find-visualstudio.js:74:16( j6 r2 d8 i/ m) E. J1 E' N3 P
gyp ERR! stack at D:\rymcu\electron-serialport\node_modules\node-gyp\lib\find-visualstudio.js:372:16
# S5 [& j9 Q) w/ u) {4 ggyp ERR! stack at D:\rymcu\electron-serialport\node_modules\node-gyp\lib\util.js:54:7
1 Y1 Q1 q' w/ W7 c* {5 ogyp ERR! stack at D:\rymcu\electron-serialport\node_modules\node-gyp\lib\util.js:33:168 b6 P2 v: A I* k' C
gyp ERR! stack at ChildProcess.exithandler (child_process.js:310:5)
- O" x2 C3 L+ o* y, V! |; a5 l: mgyp ERR! stack at ChildProcess.emit (events.js:315:20)" S% w. _5 Y g+ g1 k6 `, j. u
gyp ERR! stack at maybeClose (internal/child_process.js:1021:16)% p( c( A8 p6 i2 f' i
gyp ERR! stack at Process.ChildProcess._handle.onexit (internal/child_process.js:286:5)
@" W+ ]0 e, Wgyp ERR! System Windows_NT 10.0.15063 1 ]( C* S: ^. D% b8 X) d
4 T; l2 ~8 F* q0 |8 O/ j' `( X" o解决办法0 f, i$ n4 L4 g u- o
1、卸载nodejs重新安装一遍9 H3 F J: A4 |' I, ^; F
6 l3 J( ~9 @7 |$ V; c
2、设置淘宝镜像 npm config set registry https://registry.npm.taobao.org
1 B0 o; e; ]' J8 c- E& R3 e# _5 P1 y. C
3、安装nodejs所需的环境(Visual Studio XX、python什么鬼的),执行这个命令会自动检测并帮你安装好,npm install --g --production windows-build-tools
# n/ n1 s2 m2 x- r————————————————
, w/ X' w9 k6 N/ V. A6 q版权声明:本文为CSDN博主「一点一滴成长」的原创文章,遵循CC 4.0 BY-SA版权协议,转载请附上原文出处链接及本声明。
& U* C' X8 g# a原文链接:https://blog.csdn.net/qq_39946015/article/details/127351920 |
|