|
|
报错信息:
% {' t; o- q* C2 n! ````bash
, Y7 k) |" T% [ }gyp ERR! find VS
8 ?5 ^" O' M8 \9 H# Ggyp ERR! find VS msvs_version not set from command line or npm config( e4 O2 O; V, O8 y4 a# P
gyp ERR! find VS running in VS Command Prompt, installation path is:
/ ~' N9 q9 C2 C. W; X- k% u6 ?gyp ERR! find VS "C:\Program Files (x86)\Microsoft Visual Studio\2017"# ]# n+ R& R) \6 H
gyp ERR! find VS - will only use this version
1 B& B( k$ b8 }0 j1 @3 e% {gyp ERR! find VS could not use PowerShell to find Visual Studio 2017 or newer# x; {5 Y S; V" V6 ]* H
gyp ERR! find VS looking for Visual Studio 2015! E, R7 } J. D
gyp ERR! find VS - not found
% q/ u& r9 s. `gyp ERR! find VS looking for Visual Studio 2013
& }: U2 n5 G$ wgyp ERR! find VS - not found
5 @6 f2 O- o0 o( d7 |" {9 mgyp ERR! find VS9 m- |$ s" \8 s- h# j
gyp ERR! find VS **************************************************************6 j, y% K, k! v x' ]. l" G% d
gyp ERR! find VS You need to install the latest version of Visual Studio- d7 n1 [8 D2 Y
gyp ERR! find VS including the "Desktop development with C++" workload.4 X5 f1 J/ e5 q+ N
gyp ERR! find VS For more information consult the documentation at:$ ]4 f$ `( X3 ]# p I. n
gyp ERR! find VS https://github.com/nodejs/node-gyp#on-windows
y; v5 r7 \8 g. u- o# d5 S* ^! [) Rgyp ERR! find VS **************************************************************" s( J. K" B6 H
gyp ERR! find VS0 |4 ]1 f8 E+ f5 q
gyp ERR! configure error# w/ N* p% P! r
gyp ERR! stack Error: Could not find any Visual Studio installation to use
- o- U; T O3 o1 m$ Ngyp ERR! stack at VisualStudioFinder.fail (D:\rymcu\electron-serialport\node_modules\node-gyp\lib\find-visualstu+ \5 R9 g# Y2 Y& B& j8 d# T3 }+ p
dio.js:121:47)7 g" ]% l# P9 g1 V* ~, R
gyp ERR! stack at D:\rymcu\electron-serialport\node_modules\node-gyp\lib\find-visualstudio.js:74:16" h8 e. Y0 y/ _5 a" r
gyp ERR! stack at D:\rymcu\electron-serialport\node_modules\node-gyp\lib\find-visualstudio.js:372:169 I. ~ _; H) l9 }! K
gyp ERR! stack at D:\rymcu\electron-serialport\node_modules\node-gyp\lib\util.js:54:7
7 h U8 h0 B2 ^6 D6 v$ Y+ ~7 Ggyp ERR! stack at D:\rymcu\electron-serialport\node_modules\node-gyp\lib\util.js:33:16
! _* k; b6 z9 k6 u# Pgyp ERR! stack at ChildProcess.exithandler (child_process.js:310:5)
9 ^: a1 U L& y' ^# o1 ^gyp ERR! stack at ChildProcess.emit (events.js:315:20)
& J3 h; }0 s1 J- M( r" h# cgyp ERR! stack at maybeClose (internal/child_process.js:1021:16)% Z! K' K' o9 c/ @, s2 D' b4 G
gyp ERR! stack at Process.ChildProcess._handle.onexit (internal/child_process.js:286:5)
7 G9 {/ Y9 _$ v5 E- Y9 Z8 j# Vgyp ERR! System Windows_NT 10.0.15063 ! ]/ Q n9 d$ b. U0 p% ~7 k7 A
: Y" U4 M( `$ q) V5 P0 [. l解决办法7 a4 a& \6 n1 v' X% t2 c' T. o7 R
1、卸载nodejs重新安装一遍7 n& `, p/ A' a1 N
, o' \ V) s+ q' z4 p( A1 D- z2、设置淘宝镜像 npm config set registry https://registry.npm.taobao.org
; L' P- `, r" X# F
/ {3 g. v# y- J$ _; G$ c3、安装nodejs所需的环境(Visual Studio XX、python什么鬼的),执行这个命令会自动检测并帮你安装好,npm install --g --production windows-build-tools* t! o# q+ S' g/ \! V" f
————————————————
# M6 y8 h2 N! A' c: u版权声明:本文为CSDN博主「一点一滴成长」的原创文章,遵循CC 4.0 BY-SA版权协议,转载请附上原文出处链接及本声明。6 I0 p6 v" ]" k/ M8 A, K
原文链接:https://blog.csdn.net/qq_39946015/article/details/127351920 |
|