|
报错信息:
8 z. C" C2 Y. c* @```bash
3 G& U6 K# V% f2 q+ c9 ], J1 g. S3 K: vgyp ERR! find VS
8 h1 b$ Y) [+ y' f. Qgyp ERR! find VS msvs_version not set from command line or npm config" n/ Q. D+ S3 N: h: Y5 f2 d: w% j" N
gyp ERR! find VS running in VS Command Prompt, installation path is:
2 c0 Y( U6 Q* m0 U, j+ H4 W) }5 Kgyp ERR! find VS "C:\Program Files (x86)\Microsoft Visual Studio\2017"5 }8 s, N& Y2 }8 B0 y: [) o; E
gyp ERR! find VS - will only use this version: D; ~4 j9 I$ E" B0 |8 P3 o
gyp ERR! find VS could not use PowerShell to find Visual Studio 2017 or newer/ Y7 n& s. N H9 N
gyp ERR! find VS looking for Visual Studio 2015" H& K+ Z/ z6 W3 @
gyp ERR! find VS - not found: M4 }- n" A/ m! X% A* L2 w
gyp ERR! find VS looking for Visual Studio 2013* C9 K. a0 M. Z7 g- X
gyp ERR! find VS - not found3 a) r3 B x @. L9 P
gyp ERR! find VS2 e5 W- K: F: q5 V0 d
gyp ERR! find VS **************************************************************
9 u( M0 @0 |3 N+ ]9 B" ~# ^5 [gyp ERR! find VS You need to install the latest version of Visual Studio9 N# r6 C+ k2 \$ m
gyp ERR! find VS including the "Desktop development with C++" workload.* g5 J6 ]3 ~: a6 Z+ A
gyp ERR! find VS For more information consult the documentation at:9 b' H2 f/ `3 ?" b2 l- _% _
gyp ERR! find VS https://github.com/nodejs/node-gyp#on-windows
0 F$ H% h V6 O& \* F3 ]( ygyp ERR! find VS **************************************************************
" ^& r% {% @& i* n" Z) [1 Y: agyp ERR! find VS
$ {3 y9 ]. i3 q2 Ngyp ERR! configure error" o5 m1 o) f0 Z' _- B; v
gyp ERR! stack Error: Could not find any Visual Studio installation to use5 N8 n7 j6 g' x" U+ |8 E
gyp ERR! stack at VisualStudioFinder.fail (D:\rymcu\electron-serialport\node_modules\node-gyp\lib\find-visualstu3 f. G8 P. N3 s+ ~
dio.js:121:47)
8 b1 q" i+ o( X( j$ M$ t5 bgyp ERR! stack at D:\rymcu\electron-serialport\node_modules\node-gyp\lib\find-visualstudio.js:74:16' n% q8 b# C0 ]
gyp ERR! stack at D:\rymcu\electron-serialport\node_modules\node-gyp\lib\find-visualstudio.js:372:16
# q( x0 R) L0 K' Kgyp ERR! stack at D:\rymcu\electron-serialport\node_modules\node-gyp\lib\util.js:54:7* {- ^, s- ^; I3 I5 f& {) ^
gyp ERR! stack at D:\rymcu\electron-serialport\node_modules\node-gyp\lib\util.js:33:16
& f$ a' T+ ]5 `7 rgyp ERR! stack at ChildProcess.exithandler (child_process.js:310:5)' V8 @$ t8 c& O8 _3 ^% k, ^! N! H
gyp ERR! stack at ChildProcess.emit (events.js:315:20)/ \. r' S: S5 J9 G
gyp ERR! stack at maybeClose (internal/child_process.js:1021:16)3 u- K( Q0 Z h i. n' E! q
gyp ERR! stack at Process.ChildProcess._handle.onexit (internal/child_process.js:286:5)
& E- y, R/ {9 X/ Egyp ERR! System Windows_NT 10.0.15063 , \% @; P. h; D/ i$ c; i6 c
) p0 U6 Z7 J9 v: H7 ]解决办法
) {0 v$ `& A: C* ^1、卸载nodejs重新安装一遍
2 U! r* _2 R, c6 V0 e' P5 P& P) f! K, R" T2 \
2、设置淘宝镜像 npm config set registry https://registry.npm.taobao.org
7 r! l7 \) L* I! Y0 y! R/ f- O8 K# \' r( H" b5 m; x
3、安装nodejs所需的环境(Visual Studio XX、python什么鬼的),执行这个命令会自动检测并帮你安装好,npm install --g --production windows-build-tools
1 T0 x N, v U+ R————————————————
3 J- I9 G! G) A! ] k版权声明:本文为CSDN博主「一点一滴成长」的原创文章,遵循CC 4.0 BY-SA版权协议,转载请附上原文出处链接及本声明。
, s2 E3 h& }" m8 L! Z: m( @* k原文链接:https://blog.csdn.net/qq_39946015/article/details/127351920 |
|