|
|
报错信息:
+ `6 s4 J$ ]; z K' r. L: M6 G- F```bash
2 q: N( R# B6 ngyp ERR! find VS6 V8 o+ g" D( L- S$ Y+ {
gyp ERR! find VS msvs_version not set from command line or npm config
8 L4 g4 j6 ~4 d+ `8 J! X/ Xgyp ERR! find VS running in VS Command Prompt, installation path is:- _1 n3 p9 v0 b1 T& J: V
gyp ERR! find VS "C:\Program Files (x86)\Microsoft Visual Studio\2017" t; O2 u7 l5 u0 c8 ^0 s
gyp ERR! find VS - will only use this version
; Q4 U# {: J0 j: o' g, Q# vgyp ERR! find VS could not use PowerShell to find Visual Studio 2017 or newer
5 M4 \1 J$ s9 x7 G9 W% |gyp ERR! find VS looking for Visual Studio 20158 F4 e1 C3 q$ _$ R- j3 s+ D
gyp ERR! find VS - not found+ Z9 |+ h2 {% S1 s* M9 K
gyp ERR! find VS looking for Visual Studio 2013
& B; F4 Y3 o1 u2 H" Z7 J" bgyp ERR! find VS - not found
& \% c5 x. p; E6 g7 b3 ogyp ERR! find VS0 ~7 I- b' _# f3 _7 P. t
gyp ERR! find VS **************************************************************
u- d2 }: t' ^8 ]" h" lgyp ERR! find VS You need to install the latest version of Visual Studio
3 _) V4 S5 t9 E- ngyp ERR! find VS including the "Desktop development with C++" workload.
0 _$ X; A& Y+ R6 t Agyp ERR! find VS For more information consult the documentation at:7 a/ y+ I) t! W: ?. V
gyp ERR! find VS https://github.com/nodejs/node-gyp#on-windows
3 X/ r' A- w* ~+ X: N9 e& \9 q: ?3 Xgyp ERR! find VS **************************************************************
0 @8 y+ Z/ Y$ X( Tgyp ERR! find VS N9 B4 ]8 _ d0 \+ ~! v
gyp ERR! configure error
0 n/ y5 _: y5 Vgyp ERR! stack Error: Could not find any Visual Studio installation to use+ U" D- P: ^8 _ t7 q' N( s+ Q
gyp ERR! stack at VisualStudioFinder.fail (D:\rymcu\electron-serialport\node_modules\node-gyp\lib\find-visualstu; u' |! V0 ]1 ?. E& }
dio.js:121:47)
4 j' @) W7 O( l- b1 V, h! l) Vgyp ERR! stack at D:\rymcu\electron-serialport\node_modules\node-gyp\lib\find-visualstudio.js:74:16
0 J1 l! b5 J8 n1 u- E- n& Bgyp ERR! stack at D:\rymcu\electron-serialport\node_modules\node-gyp\lib\find-visualstudio.js:372:16# L' `0 m, o: d4 F& r
gyp ERR! stack at D:\rymcu\electron-serialport\node_modules\node-gyp\lib\util.js:54:7
. G) D. Y( O5 Z9 r2 j2 \ Rgyp ERR! stack at D:\rymcu\electron-serialport\node_modules\node-gyp\lib\util.js:33:16
* L& w( P; o' [gyp ERR! stack at ChildProcess.exithandler (child_process.js:310:5)2 N# \, f7 b) M' j" A. M4 E
gyp ERR! stack at ChildProcess.emit (events.js:315:20)" S3 x! X+ {. A4 H
gyp ERR! stack at maybeClose (internal/child_process.js:1021:16)2 s* D1 \ B! S8 l, k( Z% N/ V
gyp ERR! stack at Process.ChildProcess._handle.onexit (internal/child_process.js:286:5)
+ v6 @' o6 p7 y% ~gyp ERR! System Windows_NT 10.0.15063 ) p/ m, x& C/ P9 O) ^
3 m1 O- [3 o B7 p% y解决办法
! J z( d( j5 I O1、卸载nodejs重新安装一遍/ v/ k1 o$ d1 H6 j. x: q
* l8 ~! C5 S1 t3 |6 l! [2、设置淘宝镜像 npm config set registry https://registry.npm.taobao.org
7 F2 I, A5 t L$ l) Y* A! S {0 E1 h5 W$ z x+ J
3、安装nodejs所需的环境(Visual Studio XX、python什么鬼的),执行这个命令会自动检测并帮你安装好,npm install --g --production windows-build-tools
/ J) V8 U5 Y9 z# k2 a————————————————0 ]2 z; r7 N! B6 A; }
版权声明:本文为CSDN博主「一点一滴成长」的原创文章,遵循CC 4.0 BY-SA版权协议,转载请附上原文出处链接及本声明。
. ?% C' P2 y% I% ?+ f8 s! ~; g原文链接:https://blog.csdn.net/qq_39946015/article/details/127351920 |
|