node_modules/electron
npm ERR! command failed
npm ERR! command sh -c node install.js
npm ERR! RequestError: getaddrinfo EAI_AGAIN github.com
npm ERR! at ClientRequest.<anonymous> (/node_modules/got/dist/source/core/index.js:970:111)
npm ERR! at Object.onceWrapper (node:events:642:26)
npm ERR! at ClientRequest.emit (node:events:539:35)
npm ERR! at ClientRequest.origin.emit (/node_modules/@szmarczak/http-timer/dist/source/index.js:43:20)
npm ERR! at TLSSocket.socketErrorListener (node:_http_client:454:9)
npm ERR! at TLSSocket.emit (node:events:527:28)
npm ERR! at emitErrorNT (node:internal/streams/destroy:157:8)
npm ERR! at emitErrorCloseNT (node:internal/streams/destroy:122:3)
npm ERR! at processTicksAndRejections (node:internal/process/task_queues:83:21)
npm ERR! at GetAddrInfoReqWrap.onlookup [as oncomplete] (node:dns:71:26)
npm ERR! A complete log of this run can be found in:
解决办法:
在终端输入:
npm config set electron_mirror=https://registry.npmmirror.com/-/binary/electron/
node-sass报错:
npm ERR! path /node_modules/node-sass
npm ERR! command failed
npm ERR! command sh -c node scripts/build.js
npm ERR! Building: node_modules/node-gyp/bin/node-gyp.js rebuild --verbose --libsass_ext= --libsass_cflags= --libsass_ldflags= --libsass_library=
npm ERR! make: 进入目录“/home/node_modules/node-sass/build”
npm ERR! g++ -o Release/obj.target/libsass/src/libsass/src/ast.o ../src/libsass/src/ast.cpp '-DNODE_GYP_MODULE_NAME=libsass' '-DUSING_UV_SHARED=1' '-DUSING_V8_SHARED=1' '-DV8_DEPRECATION_WARNINGS=1' '-DV8_DEPRECATION_WARNINGS' '-DV8_IMMINENT_DEPRECATION_WARNINGS' '-D_GLIBCXX_USE_CXX11_ABI=1' '-D_LARGEFILE_SOURCE' '-D_FILE_OFFSET_BITS=64' '-D__STDC_FORMAT_MACROS' '-DOPENSSL_NO_PINSHARED' '-DOPENSSL_THREADS' '-DLIBSASS_VERSION="3.5.5"' -I/.cache/node-gyp/16.15.1/include/node -I/cache/node-gyp/16.15.1/src -I/.cache/node-gyp/16.15.1/deps/openssl/config -I/.cache/node-gyp/16.15.1/deps/openssl/openssl/include -I/.cache/node-gyp/16.15.1/deps/uv/include -I/.cache/node-gyp/16.15.1/deps/zlib -I/.cache/node-gyp/16.15.1/deps/v8/include -I../src/libsass/include -fPIC -pthread -Wall -Wextra -Wno-unused-parameter -m64 -O3 -fno-omit-frame-pointer -std=gnu++14 -std=c++0x -fexceptions -frtti -MMD -MF ./Release/.deps/Release/obj.target/libsass/src/libsass/src/ast.o.d.raw -c
解决办法:
在终端输入:
npm config set SASS_BINARY_SITE https://npmmirror.com/mirrors/node-sass/