|
|
报错信息:
, p3 O, k# g1 a( ^- ^' l: u```bash1 V, F0 y/ m" v: u' Z. g+ a' {
gyp ERR! find VS
" K2 X# `) a* Y- \4 Z6 ygyp ERR! find VS msvs_version not set from command line or npm config0 A5 W; P& a) X" w8 N
gyp ERR! find VS running in VS Command Prompt, installation path is:7 F; K% q1 u7 a2 Z, d- K
gyp ERR! find VS "C:\Program Files (x86)\Microsoft Visual Studio\2017"; s- g9 F; |& U3 X/ m; e4 c
gyp ERR! find VS - will only use this version) W4 e9 O1 c; p/ b. c ^
gyp ERR! find VS could not use PowerShell to find Visual Studio 2017 or newer1 Y9 L; C' a8 o4 N8 S
gyp ERR! find VS looking for Visual Studio 2015
! w8 G H# [6 `! x( \8 o: \' ggyp ERR! find VS - not found
) L- O) n$ l: r) _1 [gyp ERR! find VS looking for Visual Studio 2013
! J/ z8 z4 G1 ]: ^$ Egyp ERR! find VS - not found
1 W+ Y7 d( f, \$ Ogyp ERR! find VS* H/ h! Z% C: {; o$ B" W5 X
gyp ERR! find VS **************************************************************
6 e4 n+ c7 z* m% lgyp ERR! find VS You need to install the latest version of Visual Studio
4 `: ^% t4 O" I6 o/ ^gyp ERR! find VS including the "Desktop development with C++" workload.
3 w* H1 v% O% o) S& `' P+ Fgyp ERR! find VS For more information consult the documentation at:4 i. [( }6 g4 m7 E/ I
gyp ERR! find VS https://github.com/nodejs/node-gyp#on-windows
; Z4 U: M# t; p! _$ C9 h6 _gyp ERR! find VS **************************************************************/ U; }+ C- g: [% c% K
gyp ERR! find VS. i( p* a8 E( \9 q, \/ [
gyp ERR! configure error
0 {# x( T% [" s4 v D' `; i3 C- Bgyp ERR! stack Error: Could not find any Visual Studio installation to use
. W+ }4 X$ j& h$ K4 D4 vgyp ERR! stack at VisualStudioFinder.fail (D:\rymcu\electron-serialport\node_modules\node-gyp\lib\find-visualstu
; ?3 _2 m2 l; \/ V2 F4 v2 h* O5 Q8 |dio.js:121:47)
! q" C1 g+ I1 B' s; hgyp ERR! stack at D:\rymcu\electron-serialport\node_modules\node-gyp\lib\find-visualstudio.js:74:16) W$ ?9 O, \4 l" [# q$ X% h7 p7 y
gyp ERR! stack at D:\rymcu\electron-serialport\node_modules\node-gyp\lib\find-visualstudio.js:372:16/ p, W& J/ x0 m0 u; `
gyp ERR! stack at D:\rymcu\electron-serialport\node_modules\node-gyp\lib\util.js:54:7
5 k+ c) \% G2 z, Wgyp ERR! stack at D:\rymcu\electron-serialport\node_modules\node-gyp\lib\util.js:33:164 [! |* E W }4 t6 y& c( m) w
gyp ERR! stack at ChildProcess.exithandler (child_process.js:310:5)
# r( I7 b( {7 B# U. T; Ggyp ERR! stack at ChildProcess.emit (events.js:315:20): k W6 r8 K8 C" A, g2 C
gyp ERR! stack at maybeClose (internal/child_process.js:1021:16)( a1 q, ]! _6 O* F* X
gyp ERR! stack at Process.ChildProcess._handle.onexit (internal/child_process.js:286:5)9 i8 b5 f% N' X* I7 M! F6 K( |
gyp ERR! System Windows_NT 10.0.15063
% \( }% e5 R: K
# U# k8 Z) h# ?& a& S- }% n解决办法
3 R4 N& w( ~2 N3 Z0 x) G9 S. O p1、卸载nodejs重新安装一遍% p8 l' e% p" y0 F% h$ S1 S
4 U# a7 |4 g# q% \2、设置淘宝镜像 npm config set registry https://registry.npm.taobao.org
- P. `, @" h4 X, a; G2 \5 F
# A7 G2 J# D$ h+ U Q3、安装nodejs所需的环境(Visual Studio XX、python什么鬼的),执行这个命令会自动检测并帮你安装好,npm install --g --production windows-build-tools
* B# Y8 n( }7 E# @. F$ P; m! j————————————————. z: W4 x1 C2 G+ a9 R* [
版权声明:本文为CSDN博主「一点一滴成长」的原创文章,遵循CC 4.0 BY-SA版权协议,转载请附上原文出处链接及本声明。
3 P: C6 z& t- { [1 g6 ^2 F; U: d原文链接:https://blog.csdn.net/qq_39946015/article/details/127351920 |
|