|
|
报错信息:
; v0 T, e0 v6 e4 {) b8 z3 j) H5 u```bash
* s, b7 Z& k3 k* `, q9 Cgyp ERR! find VS
& a- y3 [' P* |6 @* S# {8 \0 zgyp ERR! find VS msvs_version not set from command line or npm config1 ~5 h8 `% w3 ?
gyp ERR! find VS running in VS Command Prompt, installation path is:$ z% U4 M9 g2 p- e& x
gyp ERR! find VS "C:\Program Files (x86)\Microsoft Visual Studio\2017"
% `' f' o, q& m m. m3 Kgyp ERR! find VS - will only use this version! R8 k5 O8 p& w- Q1 V6 }4 g
gyp ERR! find VS could not use PowerShell to find Visual Studio 2017 or newer
: e& ?* {. T7 T5 C$ cgyp ERR! find VS looking for Visual Studio 20156 V8 C- r/ Y5 t% f# m @
gyp ERR! find VS - not found
# O U5 K( M8 X. vgyp ERR! find VS looking for Visual Studio 2013
& y- d: ?2 L5 j4 Q1 w; A; J8 [5 Fgyp ERR! find VS - not found
& F0 k9 J8 ?3 K( ?% o* k0 Zgyp ERR! find VS( U% q' d7 h* [% T
gyp ERR! find VS **************************************************************
4 p5 ]- I+ X9 U/ s3 \gyp ERR! find VS You need to install the latest version of Visual Studio
4 B' Z( ?2 V K! Ngyp ERR! find VS including the "Desktop development with C++" workload." u' d6 L9 |9 p" k) a: L
gyp ERR! find VS For more information consult the documentation at:, ?9 z5 U$ d8 A
gyp ERR! find VS https://github.com/nodejs/node-gyp#on-windows. ?& H( E) A: T, D) r% C6 @
gyp ERR! find VS **************************************************************
* n! e: y2 T! n9 Vgyp ERR! find VS
9 A% G* D4 W# Mgyp ERR! configure error3 N, U, \- B! i& _( I
gyp ERR! stack Error: Could not find any Visual Studio installation to use6 p& g- J& `3 ?: r# h& \
gyp ERR! stack at VisualStudioFinder.fail (D:\rymcu\electron-serialport\node_modules\node-gyp\lib\find-visualstu" U$ @$ O' w/ [
dio.js:121:47)/ Z6 E: _/ i$ p/ P" v
gyp ERR! stack at D:\rymcu\electron-serialport\node_modules\node-gyp\lib\find-visualstudio.js:74:164 j# v+ z7 D% H% w( ^; k% m0 A
gyp ERR! stack at D:\rymcu\electron-serialport\node_modules\node-gyp\lib\find-visualstudio.js:372:16
, y& f( z" A. z" E! ~1 I6 hgyp ERR! stack at D:\rymcu\electron-serialport\node_modules\node-gyp\lib\util.js:54:7
4 k1 M% I6 _ @/ g* m/ Ugyp ERR! stack at D:\rymcu\electron-serialport\node_modules\node-gyp\lib\util.js:33:163 N: c5 j7 Y# G7 N' `
gyp ERR! stack at ChildProcess.exithandler (child_process.js:310:5): J# [8 B" j. }( Q% ?
gyp ERR! stack at ChildProcess.emit (events.js:315:20)
$ ]& S9 g# @3 W+ [. k% Kgyp ERR! stack at maybeClose (internal/child_process.js:1021:16)
+ c8 z% v7 T; R" `, ~: e1 qgyp ERR! stack at Process.ChildProcess._handle.onexit (internal/child_process.js:286:5)
, I2 a' S: H$ E9 F! vgyp ERR! System Windows_NT 10.0.15063
u' {- n4 P; t# c8 b5 s' ]4 }, H2 k6 _0 K a5 a
解决办法
. V5 s) ^& p( y5 S; {1、卸载nodejs重新安装一遍
g- Q( c ^# o5 s" M) M; y2 @
2、设置淘宝镜像 npm config set registry https://registry.npm.taobao.org
& q$ L0 ?+ B7 P- ^, A% s+ v/ J5 J" n' S+ w. |* J: v7 }% a" a q( I
3、安装nodejs所需的环境(Visual Studio XX、python什么鬼的),执行这个命令会自动检测并帮你安装好,npm install --g --production windows-build-tools: d+ t$ v f( w2 ?
————————————————
0 u% P4 g2 H$ u版权声明:本文为CSDN博主「一点一滴成长」的原创文章,遵循CC 4.0 BY-SA版权协议,转载请附上原文出处链接及本声明。) x9 H ~7 a) |- n
原文链接:https://blog.csdn.net/qq_39946015/article/details/127351920 |
|