|
|
报错信息:
1 O t0 i p/ B4 c$ Q4 I Y/ g```bash1 E1 e& z3 K$ |0 D6 P$ ]; N
gyp ERR! find VS/ g; J5 C% f7 ?6 Y0 m
gyp ERR! find VS msvs_version not set from command line or npm config
; a. {$ N5 t# X @9 Hgyp ERR! find VS running in VS Command Prompt, installation path is:( V8 j6 F( ?" V* f" O0 R: E
gyp ERR! find VS "C:\Program Files (x86)\Microsoft Visual Studio\2017"
3 L" [' b6 m8 I! \3 rgyp ERR! find VS - will only use this version
8 t( n5 k) ^( Z ]6 wgyp ERR! find VS could not use PowerShell to find Visual Studio 2017 or newer% y' w# t: v& {0 _
gyp ERR! find VS looking for Visual Studio 20158 \, Q( U; z0 _7 t' v4 B, K
gyp ERR! find VS - not found
& i' m& x7 P% A! g) E* o+ a4 C# kgyp ERR! find VS looking for Visual Studio 2013. P0 m- ~- U+ d( X
gyp ERR! find VS - not found/ K6 h9 J2 c- g- U, H% k& @
gyp ERR! find VS
! e" E4 l2 |% k8 `gyp ERR! find VS ************************************************************** M6 @) b1 M$ d* r$ L z! c
gyp ERR! find VS You need to install the latest version of Visual Studio
, j4 q& I1 `: V7 S. C5 ~1 Q% f9 cgyp ERR! find VS including the "Desktop development with C++" workload.1 b- b8 v: b) W5 y$ h
gyp ERR! find VS For more information consult the documentation at:3 [/ u! x1 R& Q: U$ {- @, B
gyp ERR! find VS https://github.com/nodejs/node-gyp#on-windows+ \) {' }) `7 z8 `) n. I6 S
gyp ERR! find VS **************************************************************
8 @/ O, w+ ]# G7 _' k0 agyp ERR! find VS
( Y1 M1 s8 k ~gyp ERR! configure error% W* C5 J7 `* E0 \$ t8 |/ i
gyp ERR! stack Error: Could not find any Visual Studio installation to use
5 ]0 p) Z7 @2 ~# }7 Ngyp ERR! stack at VisualStudioFinder.fail (D:\rymcu\electron-serialport\node_modules\node-gyp\lib\find-visualstu8 ^ C. `6 i* t8 z* _* |+ a: ~/ d
dio.js:121:47)3 d# o6 ?3 S( U9 |3 s+ m6 |# _
gyp ERR! stack at D:\rymcu\electron-serialport\node_modules\node-gyp\lib\find-visualstudio.js:74:16
% E, D O2 J' S+ }: qgyp ERR! stack at D:\rymcu\electron-serialport\node_modules\node-gyp\lib\find-visualstudio.js:372:163 Z s# q% |) z
gyp ERR! stack at D:\rymcu\electron-serialport\node_modules\node-gyp\lib\util.js:54:7
! W9 Q4 Z% K0 J0 P2 Egyp ERR! stack at D:\rymcu\electron-serialport\node_modules\node-gyp\lib\util.js:33:163 G! n @; i3 K3 a0 g! u. x
gyp ERR! stack at ChildProcess.exithandler (child_process.js:310:5)
+ c3 F" |) Y" ?/ rgyp ERR! stack at ChildProcess.emit (events.js:315:20)" h' F. n; Y! y3 k4 S: L
gyp ERR! stack at maybeClose (internal/child_process.js:1021:16)4 }1 _; _3 v3 H% T
gyp ERR! stack at Process.ChildProcess._handle.onexit (internal/child_process.js:286:5)1 ~! n, K# W& o# b2 s
gyp ERR! System Windows_NT 10.0.15063 ( J- b( u8 k) \+ o: f- z) {" h
7 {8 \0 ]: n4 |4 P) Z5 j: T( S6 b
解决办法
2 f S* c$ z- c1 t( r# H1、卸载nodejs重新安装一遍
: U# B; N$ d' r$ R" E: _
2 U- T6 s- r) w0 z5 b+ w0 T4 B2、设置淘宝镜像 npm config set registry https://registry.npm.taobao.org, k8 w- O, e: h( i
7 u' T% B- |# v
3、安装nodejs所需的环境(Visual Studio XX、python什么鬼的),执行这个命令会自动检测并帮你安装好,npm install --g --production windows-build-tools
% q' [# S7 o/ G% S- ~————————————————+ n$ y' t c0 p1 l! p0 F, o
版权声明:本文为CSDN博主「一点一滴成长」的原创文章,遵循CC 4.0 BY-SA版权协议,转载请附上原文出处链接及本声明。9 q# o: ~7 l3 P; ~2 G% f
原文链接:https://blog.csdn.net/qq_39946015/article/details/127351920 |
|