|
|
报错信息:0 D4 ?8 f* P: e
```bash; q: H* L, ^- Z* D* f
gyp ERR! find VS2 X' p* T, c9 R2 [' y1 B5 @) ^
gyp ERR! find VS msvs_version not set from command line or npm config
5 w0 p$ S) c+ v8 j V Jgyp ERR! find VS running in VS Command Prompt, installation path is:
% w; R/ `" Y+ o4 ^7 M& k/ vgyp ERR! find VS "C:\Program Files (x86)\Microsoft Visual Studio\2017"
' \% }, u2 O6 {% E8 Ugyp ERR! find VS - will only use this version& i) B7 g% z6 b" U* S% n# Y
gyp ERR! find VS could not use PowerShell to find Visual Studio 2017 or newer
% T' ?6 T' R$ A# O" F V) bgyp ERR! find VS looking for Visual Studio 2015
6 m: i6 \% v3 T9 l4 l1 y& Mgyp ERR! find VS - not found7 Z" _$ A* S6 L+ [) U( }: w
gyp ERR! find VS looking for Visual Studio 2013
8 f* P0 J# K7 q3 K% ogyp ERR! find VS - not found
3 M( \1 W2 Q# l4 e1 j. cgyp ERR! find VS
+ A: D. M0 P% I* v, f& Zgyp ERR! find VS **************************************************************
( ^: O% t/ c" ]2 y* V5 M4 ngyp ERR! find VS You need to install the latest version of Visual Studio- i6 h" ?! Y9 z. D8 f, X
gyp ERR! find VS including the "Desktop development with C++" workload.
# x- R; A# v9 @. U2 \- ]2 ]. [gyp ERR! find VS For more information consult the documentation at:
/ K" Y9 H7 E1 {5 w9 U( h6 Ugyp ERR! find VS https://github.com/nodejs/node-gyp#on-windows" ~# t5 u, j" M3 f: }' S. G
gyp ERR! find VS **************************************************************
1 t+ p' K+ A- T* }2 J+ f/ ygyp ERR! find VS
9 o) v. |; j) }! q: dgyp ERR! configure error& I! f5 v5 g: H" k% X
gyp ERR! stack Error: Could not find any Visual Studio installation to use
0 _9 U. M6 ^7 J6 a) xgyp ERR! stack at VisualStudioFinder.fail (D:\rymcu\electron-serialport\node_modules\node-gyp\lib\find-visualstu# n1 W% } Y* X9 y& j1 |
dio.js:121:47)
/ g0 W8 B' T3 V6 Egyp ERR! stack at D:\rymcu\electron-serialport\node_modules\node-gyp\lib\find-visualstudio.js:74:163 C9 Z7 _2 E& z& N& _% c
gyp ERR! stack at D:\rymcu\electron-serialport\node_modules\node-gyp\lib\find-visualstudio.js:372:16 T3 l! Q6 U5 B. t3 a w- \- a7 {/ b5 K
gyp ERR! stack at D:\rymcu\electron-serialport\node_modules\node-gyp\lib\util.js:54:73 Q3 K, D: d4 B2 z0 C( g4 Q
gyp ERR! stack at D:\rymcu\electron-serialport\node_modules\node-gyp\lib\util.js:33:16$ O4 _; U; e. y7 m- Z3 o, c
gyp ERR! stack at ChildProcess.exithandler (child_process.js:310:5)
0 m6 @+ Y& O) N9 x+ zgyp ERR! stack at ChildProcess.emit (events.js:315:20)
/ {* x% u3 v$ |gyp ERR! stack at maybeClose (internal/child_process.js:1021:16)
6 s. V8 `) v6 t# ]: _. n7 qgyp ERR! stack at Process.ChildProcess._handle.onexit (internal/child_process.js:286:5)
- A, F* j, D! J0 _! Fgyp ERR! System Windows_NT 10.0.15063
) g/ [2 v. F( A. g% D X3 P* k4 ?. |; [4 d3 @( f
解决办法
. D& x8 Y) X; {( e, b! x( V1、卸载nodejs重新安装一遍
! u5 F p7 ^6 W) D- _+ S$ N& y- \9 w+ `/ Z- e5 y) m V. G+ A3 _$ r6 X
2、设置淘宝镜像 npm config set registry https://registry.npm.taobao.org
: d2 m: w" G- @" T) e# Q, B; N
4 }% K( b7 B$ H- Q. h8 |3 H! B! J3、安装nodejs所需的环境(Visual Studio XX、python什么鬼的),执行这个命令会自动检测并帮你安装好,npm install --g --production windows-build-tools
4 F4 J5 r. v1 C* e0 X+ q' q————————————————8 Y# B2 t/ r9 S) W# J* G) q9 Q
版权声明:本文为CSDN博主「一点一滴成长」的原创文章,遵循CC 4.0 BY-SA版权协议,转载请附上原文出处链接及本声明。$ O( p& ^1 V$ C
原文链接:https://blog.csdn.net/qq_39946015/article/details/127351920 |
|