|
|
报错信息:7 S, E) C0 Z; ^: P0 J
```bash
6 Q1 X4 D. I# V* c2 ~: igyp ERR! find VS
% A7 e) c" {3 ]' \gyp ERR! find VS msvs_version not set from command line or npm config
7 j( L3 l+ s( I0 \+ q: G# q! igyp ERR! find VS running in VS Command Prompt, installation path is:
8 p# v! @+ w. k4 Ngyp ERR! find VS "C:\Program Files (x86)\Microsoft Visual Studio\2017"% w3 N0 n* G; [8 K4 i8 b0 P7 n4 d
gyp ERR! find VS - will only use this version
3 x# P" J9 A# ~- N, {. Qgyp ERR! find VS could not use PowerShell to find Visual Studio 2017 or newer
& x1 F) I' M2 b2 p# x2 ?gyp ERR! find VS looking for Visual Studio 2015
4 Z( O4 [) j- [& Rgyp ERR! find VS - not found
" d) X+ Z7 i, D) t P* g* b& _- Ygyp ERR! find VS looking for Visual Studio 2013
# v) f+ ?' t5 { L% c& ugyp ERR! find VS - not found9 V+ m- {) x" b& h7 A- X4 Q
gyp ERR! find VS
, B6 {$ g3 `) l$ Zgyp ERR! find VS **************************************************************9 f6 G- Z+ G7 \: x3 A
gyp ERR! find VS You need to install the latest version of Visual Studio
. D$ x, z1 o) Z/ jgyp ERR! find VS including the "Desktop development with C++" workload.2 H' G1 U5 [7 `- g0 q7 C$ J, Y
gyp ERR! find VS For more information consult the documentation at:
# ]: v/ R$ d: X1 }gyp ERR! find VS https://github.com/nodejs/node-gyp#on-windows
8 R" s9 ^! y! i- \" |2 Ugyp ERR! find VS **************************************************************
" }5 ^6 t% D7 ?; s& \; Qgyp ERR! find VS# M4 _" E! y- X
gyp ERR! configure error
( l5 T* f- f* Q# j# Z; K4 Bgyp ERR! stack Error: Could not find any Visual Studio installation to use
- o4 ~0 Z E. }% Q& n* ~1 U- |4 ngyp ERR! stack at VisualStudioFinder.fail (D:\rymcu\electron-serialport\node_modules\node-gyp\lib\find-visualstu3 W" h! |, T+ {- a0 F+ [" t
dio.js:121:47)8 p f: g9 g o3 ]+ g( l( Y
gyp ERR! stack at D:\rymcu\electron-serialport\node_modules\node-gyp\lib\find-visualstudio.js:74:16
q# P0 }& v f, M8 ?gyp ERR! stack at D:\rymcu\electron-serialport\node_modules\node-gyp\lib\find-visualstudio.js:372:16) A& n$ K0 ?6 e5 g: p5 v! [
gyp ERR! stack at D:\rymcu\electron-serialport\node_modules\node-gyp\lib\util.js:54:7
$ u k3 N' `' O0 j" G2 R8 Ggyp ERR! stack at D:\rymcu\electron-serialport\node_modules\node-gyp\lib\util.js:33:163 ]; Q1 s. [$ m7 G# b6 M+ V/ ]
gyp ERR! stack at ChildProcess.exithandler (child_process.js:310:5)
- q* [ J+ q) {gyp ERR! stack at ChildProcess.emit (events.js:315:20)
/ P6 T5 w# C, s6 p0 ?gyp ERR! stack at maybeClose (internal/child_process.js:1021:16). u4 q O3 l' Y6 M( i; |
gyp ERR! stack at Process.ChildProcess._handle.onexit (internal/child_process.js:286:5)# F+ d4 m+ r* A0 l- n, y9 i
gyp ERR! System Windows_NT 10.0.15063
8 P% } c9 a9 v: R; _
# s1 ]5 H5 i: E解决办法
% ^8 `# `4 H5 Z6 y# c5 Q9 ]: Z1、卸载nodejs重新安装一遍7 f! C' | M% i& [" o
; t& i2 Y0 B% ?5 E. N% F* P7 ~) J
2、设置淘宝镜像 npm config set registry https://registry.npm.taobao.org6 i2 W! ]9 `% G: c' g8 s* j
$ i" x$ ~! J1 k$ k3、安装nodejs所需的环境(Visual Studio XX、python什么鬼的),执行这个命令会自动检测并帮你安装好,npm install --g --production windows-build-tools. D2 A1 Z. N; c$ A! ?
————————————————( t& W! ?7 ?2 i$ x: E/ `
版权声明:本文为CSDN博主「一点一滴成长」的原创文章,遵循CC 4.0 BY-SA版权协议,转载请附上原文出处链接及本声明。
5 x+ `, o0 A. _4 q原文链接:https://blog.csdn.net/qq_39946015/article/details/127351920 |
|