|
|
报错信息:
) i% ^# ]1 W- b$ m```bash
4 i; s; P) {2 h0 E7 Lgyp ERR! find VS5 a* a" q% r k" E: _
gyp ERR! find VS msvs_version not set from command line or npm config
% N0 d# C* i7 C7 @gyp ERR! find VS running in VS Command Prompt, installation path is:- L# h- u% X" W6 ]- q1 u
gyp ERR! find VS "C:\Program Files (x86)\Microsoft Visual Studio\2017". L i' B( C( Z9 i0 ]
gyp ERR! find VS - will only use this version. f; v) D% P. U: S
gyp ERR! find VS could not use PowerShell to find Visual Studio 2017 or newer. `7 t. j c* u% `4 ~
gyp ERR! find VS looking for Visual Studio 2015
# R' t$ ?/ o: o4 T" ]7 hgyp ERR! find VS - not found
: x( O3 c+ z6 h7 y/ Ggyp ERR! find VS looking for Visual Studio 2013
% M- M) ^5 }' f3 A) wgyp ERR! find VS - not found: B& |4 T9 F! W$ E4 Y! e
gyp ERR! find VS
- \. h0 U5 Z: T/ Ygyp ERR! find VS **************************************************************
7 } H$ Z* a3 V7 j; Y% |) }8 j( Egyp ERR! find VS You need to install the latest version of Visual Studio2 r; n* x; \! n( w7 C2 X/ A
gyp ERR! find VS including the "Desktop development with C++" workload.
5 D! e' V3 u7 t( jgyp ERR! find VS For more information consult the documentation at:0 g$ F5 a1 n' c2 A+ o
gyp ERR! find VS https://github.com/nodejs/node-gyp#on-windows
! s9 G; y2 D# v& |4 T' g7 agyp ERR! find VS **************************************************************
8 |2 [3 Q. {/ V6 K# a+ Rgyp ERR! find VS
3 q; I( q, L, t; N8 K2 Hgyp ERR! configure error0 [" E- y0 E" u' @
gyp ERR! stack Error: Could not find any Visual Studio installation to use
- K4 X6 Z7 W% n/ J- ygyp ERR! stack at VisualStudioFinder.fail (D:\rymcu\electron-serialport\node_modules\node-gyp\lib\find-visualstu! }+ `0 @3 {$ ^ X% J$ w& ?" B5 ]
dio.js:121:47)- `: m$ k% b- m
gyp ERR! stack at D:\rymcu\electron-serialport\node_modules\node-gyp\lib\find-visualstudio.js:74:163 k# ]4 H5 H3 X6 E" N% u
gyp ERR! stack at D:\rymcu\electron-serialport\node_modules\node-gyp\lib\find-visualstudio.js:372:166 o- y+ q2 C$ C6 X- ]) c
gyp ERR! stack at D:\rymcu\electron-serialport\node_modules\node-gyp\lib\util.js:54:7
( B% \: t; l+ h, t4 R5 Pgyp ERR! stack at D:\rymcu\electron-serialport\node_modules\node-gyp\lib\util.js:33:16
8 K- @. d# y% D0 s! t* V/ V$ j _ Wgyp ERR! stack at ChildProcess.exithandler (child_process.js:310:5)1 d1 P2 ]; b8 @3 i% f% {4 g
gyp ERR! stack at ChildProcess.emit (events.js:315:20)
* v0 N3 d; I) p$ ~3 igyp ERR! stack at maybeClose (internal/child_process.js:1021:16)5 v4 N0 t- V0 p# I
gyp ERR! stack at Process.ChildProcess._handle.onexit (internal/child_process.js:286:5)% w( t& R) ~$ R% [; Q' P1 J
gyp ERR! System Windows_NT 10.0.15063 $ ^0 u' {: Z, \0 k. a, H
' c- x( y7 Z P解决办法
9 X' y$ C9 \4 C2 y( \0 @+ G1、卸载nodejs重新安装一遍
/ e' U6 U, ?! e* }9 i! |8 j) I2 Y9 J p$ @9 }, M7 x( N/ v
2、设置淘宝镜像 npm config set registry https://registry.npm.taobao.org* W1 R# a6 j- u; s
( N! b1 H7 G: x4 ^/ c1 ?* T3、安装nodejs所需的环境(Visual Studio XX、python什么鬼的),执行这个命令会自动检测并帮你安装好,npm install --g --production windows-build-tools. n/ L. M: E* p, r# G
————————————————
" Q* B) j3 V3 E. ~& g版权声明:本文为CSDN博主「一点一滴成长」的原创文章,遵循CC 4.0 BY-SA版权协议,转载请附上原文出处链接及本声明。
9 X, H1 l) E8 l3 w原文链接:https://blog.csdn.net/qq_39946015/article/details/127351920 |
|