|
|
报错信息:
* P: ]- O' L; S$ p) ~9 D```bash
8 x! j6 I& X8 Hgyp ERR! find VS1 @6 i) {8 f6 ^
gyp ERR! find VS msvs_version not set from command line or npm config
+ F) x M1 u+ f6 I7 L; ?0 E5 u6 Egyp ERR! find VS running in VS Command Prompt, installation path is:
( K) v$ n9 @1 igyp ERR! find VS "C:\Program Files (x86)\Microsoft Visual Studio\2017"
, i8 {2 t+ ]3 | T5 C8 w: k* Vgyp ERR! find VS - will only use this version5 ] P/ d# y2 q# l1 V" M3 M0 `
gyp ERR! find VS could not use PowerShell to find Visual Studio 2017 or newer1 o5 X6 I) j6 w3 F3 g" V: L
gyp ERR! find VS looking for Visual Studio 2015
0 D7 |4 c0 n7 S8 G Egyp ERR! find VS - not found
4 U/ S+ e$ t% xgyp ERR! find VS looking for Visual Studio 2013
4 w1 r0 ~! G0 u) Egyp ERR! find VS - not found
x$ V: d z1 o# Q8 i# K' _& xgyp ERR! find VS
# W) ^/ H3 v3 H/ B5 a1 Rgyp ERR! find VS **************************************************************
- W- ?0 D: ]) |0 Q. Vgyp ERR! find VS You need to install the latest version of Visual Studio, g1 t5 Q# I2 v5 N4 }& y
gyp ERR! find VS including the "Desktop development with C++" workload.
- m( N8 O9 B+ C. xgyp ERR! find VS For more information consult the documentation at:
8 d- e* |$ a& [7 X$ T( Ngyp ERR! find VS https://github.com/nodejs/node-gyp#on-windows
% e: @( v! X+ O8 e4 hgyp ERR! find VS **************************************************************& n- G: |) d/ t/ e6 b) _
gyp ERR! find VS
% U) W. t9 k0 ]$ `5 ?! R! G: mgyp ERR! configure error
8 Y/ J4 R t3 h' ugyp ERR! stack Error: Could not find any Visual Studio installation to use$ g, d' i& V9 l! z0 |
gyp ERR! stack at VisualStudioFinder.fail (D:\rymcu\electron-serialport\node_modules\node-gyp\lib\find-visualstu- s) q2 i1 P- @! k5 _5 y O
dio.js:121:47)
& p5 u% B# Q& G) _gyp ERR! stack at D:\rymcu\electron-serialport\node_modules\node-gyp\lib\find-visualstudio.js:74:16
% T8 X/ W# z( e# Qgyp ERR! stack at D:\rymcu\electron-serialport\node_modules\node-gyp\lib\find-visualstudio.js:372:162 V) E4 l! p. Q* q; h" I/ A; E# y* O
gyp ERR! stack at D:\rymcu\electron-serialport\node_modules\node-gyp\lib\util.js:54:7
8 d+ A3 i; a/ n% f/ ] Pgyp ERR! stack at D:\rymcu\electron-serialport\node_modules\node-gyp\lib\util.js:33:16
; G% N4 \$ S. l' x1 _gyp ERR! stack at ChildProcess.exithandler (child_process.js:310:5)( v; D' \' n9 x5 }; F# a
gyp ERR! stack at ChildProcess.emit (events.js:315:20)
2 s: T0 {' ?. x8 ]) y' Fgyp ERR! stack at maybeClose (internal/child_process.js:1021:16)
5 J6 w+ X: A2 M; C5 X2 Z# Fgyp ERR! stack at Process.ChildProcess._handle.onexit (internal/child_process.js:286:5)% E7 v* w4 l9 ~2 r/ O
gyp ERR! System Windows_NT 10.0.15063
; Y/ T7 b1 n8 a' g5 s: X3 b
; a0 S2 P5 T9 o$ b解决办法: T. }. P/ c$ q) K
1、卸载nodejs重新安装一遍% x# l) d6 h4 t3 S1 o. l' a
& _( O$ x ~! ^- g2 {) b' `
2、设置淘宝镜像 npm config set registry https://registry.npm.taobao.org
7 m9 d! T9 }; B6 y7 c$ v+ D
" u3 a$ Y" V8 f& t3、安装nodejs所需的环境(Visual Studio XX、python什么鬼的),执行这个命令会自动检测并帮你安装好,npm install --g --production windows-build-tools5 C) j: @ N# F
————————————————; p }+ c% L, H. ? W
版权声明:本文为CSDN博主「一点一滴成长」的原创文章,遵循CC 4.0 BY-SA版权协议,转载请附上原文出处链接及本声明。
# e: |- F; |- I( ]! k# t4 x" H原文链接:https://blog.csdn.net/qq_39946015/article/details/127351920 |
|