Comments (7)
1、升级一下 Node 版本
2、npm 安装使用其他镜像试试,比如:npm install --registry=https://registry.npm.taobao.org
from nei.
谢谢 我在尝试下 有问题继续反馈,Node 版本是 v12.16.2
from nei.
实测切换国内镜像也没用。下载可以正常,只是在 node-gyp 编译环境卡主。环境 cenos7 有大神可以将编译好的依赖库上传上来么?node_modules 文件夹
from nei.
@ss958 解决了吗?这个是 Node 本身的问题。
from nei.
[email protected] install E:\nei_\node_modules\hiredis
node-gyp rebuild
E:\nei_\node_modules\hiredis>if not defined npm_config_node_gyp (node "D:\nvm\v14.0.0\node_modules\npm\node_modules\npm-lifecycle\node-gyp-bin\....\node_modules\node-gyp\bin\node-gyp.js" rebuild ) else (node "D:\nvm\v14.0.0\node_modules\npm\node_modules\node-gyp\bin\node-gyp.js" rebuild )
gyp WARN install got an error, rolling back install
gyp ERR! configure error
gyp ERR! stack Error: read ECONNRESET
gyp ERR! stack at TLSWrap.onStreamRead (internal/stream_base_commons.js:205:27)
gyp ERR! System Windows_NT 10.0.18362
gyp ERR! command "C:\Program Files\nodejs\node.exe" "D:\nvm\v14.0.0\node_modules\npm\node_modules\node-gyp\bin\node-gyp.js" "rebuild"
gyp ERR! cwd E:\nei_\node_modules\hiredis
gyp ERR! node -v v14.0.0
gyp ERR! node-gyp -v v5.1.0
gyp ERR! not ok
[email protected] install E:\nei_\node_modules\nodejieba
node-pre-gyp install --fallback-to-build
node-pre-gyp WARN Using request for node-pre-gyp https download
node-pre-gyp WARN Tried to download(404): https://github.com/yanyiwu/nodejieba/releases/download/2.4.1/nodejieba-v2.4.1-node-v83-win32-x64.tar.gz
node-pre-gyp WARN Pre-built binaries not found for [email protected] and [email protected] (node-v83 ABI, unknown) (falling back to source compile with node-gyp)
请问为什么npm install了之后会自动执行这个gyp的命令并且失败了呢,Node版本是14.0.0
from nei.
是不是切过 Node 版本?删除 node_modules
后再试试
不行的话试试低版本 Node(同样要删除 node_modules
)
还是不行就试试 cnpm:
npm install -g cnpm --registry=https://registry.npm.taobao.org
cnpm install
from nei.
是不是切过 Node 版本?删除
node_modules
后再试试不行的话试试低版本 Node(同样要删除
node_modules
)还是不行就试试 cnpm:
npm install -g cnpm --registry=https://registry.npm.taobao.org
cnpm install
E:\nei_>cnpm install
| [3/31] Installing koa-router@^5.4.0[[email protected] › koa-body-parsers@git+https://github.com/tunnckoCore/body-parsers.git] install koa-body-parsers from git git+https://github.com/tunnckoCore/body-parsers.git, may be very slow, please keep patience
\ [12/31] Installing raw-body@^2.1.0[npminstall:runscript] [email protected] › hiredis@~0.5.0 found binding.gyp file, auto run "node-gyp rebuild", root: "E:\nei_\node_modules\_hiredis@0.5.0@hiredis"
E:\nei_\node_modules_hiredis@0.5.0@hiredis>node "D:\nvm\v12.18.3\node_modules\cnpm\node_modules\npminstall\node-gyp-bin\node-gyp.js" rebuild
\ [14/31] Installing pinyin@^2.7.3gyp ERR! configure error
gyp ERR! stack Error: Command failed: D:\Anaconda3\python.EXE -c import sys; print "%s.%s.%s" % sys.version_info[:3];
gyp ERR! stack File "", line 1
gyp ERR! stack import sys; print "%s.%s.%s" % sys.version_info[:3];
gyp ERR! stack ^
gyp ERR! stack SyntaxError: invalid syntax
gyp ERR! stack
gyp ERR! stack at ChildProcess.exithandler (child_process.js:303:12)
gyp ERR! stack at ChildProcess.emit (events.js:315:20)
gyp ERR! stack at maybeClose (internal/child_process.js:1021:16)
gyp ERR! stack at Process.ChildProcess.handle.onexit (internal/child_process.js:286:5)
gyp ERR! System Windows_NT 10.0.18362
gyp ERR! command "C:\Program Files\nodejs\node.exe" "D:\nvm\v12.18.3\node_modules\cnpm\node_modules\npminstall\node-gyp-bin\node-gyp.js" "rebuild"
gyp ERR! cwd E:\nei\node_modules_hiredis@0.5.0@hiredis
gyp ERR! node -v v12.18.3
gyp ERR! node-gyp -v v3.8.0
gyp ERR! not ok
[npminstall:runscript:error] [email protected] › hiredis@~0.5.0 has binding.gyp file, run "node-gyp rebuild" error: Error [RunScriptError]: Run "C:\Windows\system32\cmd.exe /d /s /c node-gyp rebuild" error, exit code 1
at ChildProcess. (D:\nvm\v12.18.3\node_modules\cnpm\node_modules\runscript\index.js:96:21)
at ChildProcess.emit (events.js:315:20)
at maybeClose (internal/child_process.js:1021:16)
at Process.ChildProcess._handle.onexit (internal/child_process.js:286:5) {
stdio: [Object],
exitcode: 1
}
| [14/31] Installing pinyin@^2.7.3[hiredis@~0.5.0] optional install error: RunScriptError: Run "C:\Windows\system32\cmd.exe /d /s /c node-gyp rebuild" error, exit code 1
at ChildProcess. (D:\nvm\v12.18.3\node_modules\cnpm\node_modules\runscript\index.js:96:21)
at ChildProcess.emit (events.js:315:20)
at maybeClose (internal/child_process.js:1021:16)
at Process.ChildProcess._handle.onexit (internal/child_process.js:286:5)
| [23/31] Installing path-dirname@^1.0.0platform unsupported [email protected] › [email protected] › fsevents@^1.2.7 Package require os(darwin) not compatible with your platform(win32)
/ [23/31] Installing tweetnacl@^0.14.3[fsevents@^1.2.7] optional install error: Package require os(darwin) not compatible with your platform(win32)
\ [26/31] Installing is-buffer@^1.1.5[[email protected] › gkt@https://tgz.pm2.io/gkt-1.0.0.tgz] install gkt from remote https://tgz.pm2.io/gkt-1.0.0.tgz, may be very slow, please keep patience
\ [28/31] Installing tar@^4.4.2
WARN node unsupported "[email protected]" is incompatible with [email protected] › [email protected] › hawk@~0.10.2, expected [email protected]
- [29/31] Installing osenv@^0.1.4
WARN node unsupported "[email protected]" is incompatible with [email protected] › [email protected] › [email protected] › [email protected], expected [email protected]
WARN node unsupported "[email protected]" is incompatible with [email protected] › [email protected] › [email protected] › [email protected], expected [email protected]
WARN node unsupported "[email protected]" is incompatible with [email protected] › [email protected] › [email protected] › [email protected], expected [email protected]
\ [29/31] Installing readable-stream@^2.0.6
WARN node unsupported "[email protected]" is incompatible with [email protected] › [email protected] › [email protected] › [email protected], expected [email protected]
√ Installed 31 packages
√ Linked 355 latest versions
[1/2] scripts.postinstall ejs@^2.5.1 run "node ./postinstall.js", root: "E:\nei_\node_modules\_ejs@2.7.4@ejs"
Thank you for installing EJS: built with the Jake JavaScript build tool (https://jakejs.com/)
[1/2] scripts.postinstall ejs@^2.5.1 finished in 91ms
[2/2] scripts.install [email protected] › nodejieba@^2.2.1 run "node-pre-gyp install --fallback-to-build", root: "E:\nei_\node_modules\_nodejieba@2.4.1@nodejieba"
node-pre-gyp WARN Using request for node-pre-gyp https download
node-pre-gyp http GET https://github.com/yanyiwu/nodejieba/releases/download/2.4.1/nodejieba-v2.4.1-node-v72-win32-x64.tar.gz
node-pre-gyp http 404 https://github.com/yanyiwu/nodejieba/releases/download/2.4.1/nodejieba-v2.4.1-node-v72-win32-x64.tar.gz
node-pre-gyp WARN Tried to download(404): https://github.com/yanyiwu/nodejieba/releases/download/2.4.1/nodejieba-v2.4.1-node-v72-win32-x64.tar.gz
node-pre-gyp WARN Pre-built binaries not found for [email protected] and [email protected] (node-v72 ABI, unknown) (falling back to source compile with node-gyp)
node-pre-gyp http 404 status code downloading tarball https://github.com/yanyiwu/nodejieba/releases/download/2.4.1/nodejieba-v2.4.1-node-v72-win32-x64.tar.gz
E:\nei_\node_modules_nodejieba@2.4.1@nodejieba>node "D:\nvm\v12.18.3\node_modules\cnpm\node_modules\npminstall\node-gyp-bin\node-gyp.js" clean
E:\nei_\node_modules_nodejieba@2.4.1@nodejieba>node "D:\nvm\v12.18.3\node_modules\cnpm\node_modules\npminstall\node-gyp-bin\node-gyp.js" configure --fallback-to-build --module=E:\nei_\node_modules_nodejieba@2.4.1@nodejieba\build\Release\nodejieba.node --module_name=nodejieba --module_path=E:\nei_\node_modules_nodejieba@2.4.1@nodejieba\build\Release --napi_version=6 --node_abi_napi=napi --napi_build_version=0 --node_napi_label=node-v72
gyp ERR! configure error
gyp ERR! stack Error: Command failed: D:\Anaconda3\python.EXE -c import sys; print "%s.%s.%s" % sys.version_info[:3];
gyp ERR! stack File "", line 1
gyp ERR! stack import sys; print "%s.%s.%s" % sys.version_info[:3];
gyp ERR! stack ^
gyp ERR! stack SyntaxError: invalid syntax
gyp ERR! stack
gyp ERR! stack at ChildProcess.exithandler (child_process.js:303:12)
gyp ERR! stack at ChildProcess.emit (events.js:315:20)
gyp ERR! stack at maybeClose (internal/child_process.js:1021:16)
gyp ERR! stack at Process.ChildProcess.handle.onexit (internal/child_process.js:286:5)
gyp ERR! System Windows_NT 10.0.18362
gyp ERR! command "C:\Program Files\nodejs\node.exe" "D:\nvm\v12.18.3\node_modules\cnpm\node_modules\npminstall\node-gyp-bin\node-gyp.js" "configure" "--fallback-to-build" "--module=E:\nei\node_modules\nodejieba@2.4.1@nodejieba\build\Release\nodejieba.node" "--module_name=nodejieba" "--module_path=E:\nei\node_modules\nodejieba@2.4.1@nodejieba\build\Release" "--napi_version=6" "--node_abi_napi=napi" "--napi_build_version=0" "--node_napi_label=node-v72"
gyp ERR! cwd E:\nei\node_modules_nodejieba@2.4.1@nodejieba
gyp ERR! node -v v12.18.3
gyp ERR! node-gyp -v v3.8.0
gyp ERR! not ok
node-pre-gyp ERR! build error
node-pre-gyp ERR! stack Error: Failed to execute 'node-gyp.cmd configure --fallback-to-build --module=E:\nei_\node_modules_nodejieba@2.4.1@nodejieba\build\Release\nodejieba.node --module_name=nodejieba --module_path=E:\nei_\node_modules_nodejieba@2.4.1@nodejieba\build\Release --napi_version=6 --node_abi_napi=napi --napi_build_version=0 --node_napi_label=node-v72' (1)
node-pre-gyp ERR! stack at ChildProcess. (E:\nei_\node_modules_node-pre-gyp@0.14.0@node-pre-gyp\lib\util\compile.js:83:29)
node-pre-gyp ERR! stack at ChildProcess.emit (events.js:315:20)
node-pre-gyp ERR! stack at maybeClose (internal/child_process.js:1021:16)
node-pre-gyp ERR! stack at Process.ChildProcess.handle.onexit (internal/child_process.js:286:5)
node-pre-gyp ERR! System Windows_NT 10.0.18362
node-pre-gyp ERR! command "C:\Program Files\nodejs\node.exe" "E:\nei\node_modules\node-pre-gyp@0.14.0@node-pre-gyp\bin\node-pre-gyp" "install" "--fallback-to-build"
node-pre-gyp ERR! cwd E:\nei\node_modules_nodejieba@2.4.1@nodejieba
node-pre-gyp ERR! node -v v12.18.3
node-pre-gyp ERR! node-pre-gyp -v v0.14.0
node-pre-gyp ERR! not ok
Failed to execute 'node-gyp.cmd configure --fallback-to-build --module=E:\nei_\node_modules_nodejieba@2.4.1@nodejieba\build\Release\nodejieba.node --module_name=nodejieba --module_path=E:\nei_\node_modules_nodejieba@2.4.1@nodejieba\build\Release --napi_version=6 --node_abi_napi=napi --napi_build_version=0 --node_napi_label=node-v72' (1)
[npminstall:runscript:error] [email protected] › nodejieba@^2.2.1 scripts.install run "node-pre-gyp install --fallback-to-build" error: Error [RunScriptError]: Run "C:\Windows\system32\cmd.exe /d /s /c node-pre-gyp install --fallback-to-build" error, exit code 1
at ChildProcess. (D:\nvm\v12.18.3\node_modules\cnpm\node_modules\runscript\index.js:96:21)
at ChildProcess.emit (events.js:315:20)
at maybeClose (internal/child_process.js:1021:16)
at Process.ChildProcess._handle.onexit (internal/child_process.js:286:5) {
stdio: [Object],
exitcode: 1
}
[email protected] › nodejieba@^2.2.1 optional error: RunScriptError: Run "C:\Windows\system32\cmd.exe /d /s /c node-pre-gyp install --fallback-to-build" error, exit code 1
at ChildProcess. (D:\nvm\v12.18.3\node_modules\cnpm\node_modules\runscript\index.js:96:21)
at ChildProcess.emit (events.js:315:20)
at maybeClose (internal/child_process.js:1021:16)
at Process.ChildProcess.handle.onexit (internal/child_process.js:286:5)
√ Run 2 scripts
deprecate nodemailer@^2.4.1 All versions below 4.0.1 of Nodemailer are deprecated. See https://nodemailer.com/status/
deprecate [email protected] › [email protected] This project is unmaintained
deprecate [email protected] › [email protected] If using 2.x branch, please upgrade to at least 2.1.6 to avoid a serious bug with socket data flow and an import issue introduced in 2.1.0
deprecate [email protected] › [email protected] › [email protected] This project is unmaintained
deprecate request@^2.79.0 request has been deprecated, see request/request#3142
deprecate [email protected] › har-validator@~5.1.3 this library is no longer supported
deprecate [email protected] › chokidar@^2 Chokidar 2 will break on node v14+. Upgrade to chokidar 3 with 15x less dependencies.
deprecate [email protected] › [email protected] Legacy versions of mkdirp are no longer supported. Please update to mkdirp 1.x. (Note that the API surface has changed to use Promises in 1.x.)
deprecate [email protected] › [email protected] › fsevents@^1.2.7 fsevents 1 will break on node v14+ and could be using insecure binaries. Upgrade to fsevents 2.
deprecate [email protected] › [email protected] › [email protected] › [email protected] › [email protected] › urix@^0.1.0 Please see https://github.com/lydell/urix#deprecated
deprecate [email protected] › mkdirp@~0.3.5 Legacy versions of mkdirp are no longer supported. Please update to mkdirp 1.x. (Note that the API surface has changed to use Promises in 1.x.)
deprecate [email protected] › [email protected] request has been deprecated, see request/request#3142
deprecate [email protected] › [email protected] › minimatch@~0.2.11 Please update to minimatch 3.0.2 or higher to avoid a RegExp DoS issue
deprecate [email protected] › [email protected] › node-uuid@~1.4.0 Use uuid module instead
deprecate [email protected] › [email protected] › [email protected] › graceful-fs@~1.2.0 please upgrade to graceful-fs 4 for compatibility with current and future versions of Node.js
deprecate [email protected] › [email protected] › hawk@~0.10.2 This module moved to @hapi/hawk. Please make sure to switch over as this distribution is no longer supported and may contain bugs and critical security issues.
deprecate [email protected] › [email protected] › [email protected] › [email protected] This version has been deprecated in accordance with the hapi support policy (hapi.im/support). Please upgrade to the latest version to get the best features, bug fixes, and security patches. If you are unable to upgrade at this time, paid support is available for older versions (hapi.im/commercial).
deprecate [email protected] › [email protected] › [email protected] › [email protected] This module moved to @hapi/sntp. Please make sure to switch over as this distribution is no longer supported and may contain bugs and critical security issues.
deprecate [email protected] › [email protected] › [email protected] › [email protected] This version has been deprecated in accordance with the hapi support policy (hapi.im/support). Please upgrade to the latest version to get the best features, bug fixes, and security patches. If you are unable to upgrade at this time, paid support is available for older versions (hapi.im/commercial).
deprecate [email protected] › [email protected] › [email protected] › [email protected] This version has been deprecated in accordance with the hapi support policy (hapi.im/support). Please upgrade to the latest version to get the best features, bug fixes, and security patches. If you are unable to upgrade at this time, paid support is available for older versions (hapi.im/commercial).
Recently updated (since 2020-08-28): 3 packages (detail see file E:\nei\node_modules.recently_updates.txt)
√ All packages installed (454 packages installed from npm registry, 1 packages installed from remote url, 1 packages installed from git, used 18s(network 12s), speed 65.16kB/s, json 384(813.1kB), tarball 0B)
试了node版本 12.18.3和 14.0.0还有8.5.0报错都是这样
好像用到了Python?我的python版本是3.7.3
python版本切换到2.7
gyp的报错会变成这样
- [27/31] Installing tunnel-agent@~0.3.0gyp ERR! build error
gyp ERR! stack Error:C:\Program Files (x86)\Microsoft Visual Studio\2017\BuildTools\MSBuild\15.0\Bin\MSBuild.exe
failed with exit code: 1
gyp ERR! stack at ChildProcess.onExit (D:\nvm\v12.18.3\node_modules\cnpm\node_modules\node-gyp\lib\build.js:262:23)
gyp ERR! stack at emitTwo (events.js:125:13)
gyp ERR! stack at ChildProcess.emit (events.js:213:7)
gyp ERR! stack at Process.ChildProcess.handle.onexit (internal/child_process.js:200:12)
gyp ERR! System Windows_NT 10.0.18362
gyp ERR! command "C:\Program Files\nodejs\node.exe" "D:\nvm\v12.18.3\node_modules\cnpm\node_modules\npminstall\node-gyp-bin\node-gyp.js" "rebuild"
gyp ERR! cwd E:\nei\node_modules_hiredis@0.5.0@hiredis
gyp ERR! node -v v8.5.0
gyp ERR! node-gyp -v v3.8.0
gyp ERR! not ok
[npminstall:runscript:error] [email protected] › hiredis@~0.5.0 has binding.gyp file, run "node-gyp rebuild" error: Error [RunScriptError]: Run "C:\Windows\system32\cmd.exe /d /s /c node-gyp rebuild" error, exit code 1
at ChildProcess. (D:\nvm\v12.18.3\node_modules\cnpm\node_modules\runscript\index.js:96:21)
at ChildProcess.emit (events.js:315:20)
at maybeClose (internal/child_process.js:1021:16)
at Process.ChildProcess._handle.onexit (internal/child_process.js:286:5) {
stdio: [Object],
exitcode: 1
}
from nei.
Related Issues (20)
- (二次开发)关于在数据模型保存时新增弹窗的问题 HOT 2
- 导入swagger文件失败,格式经过swagger.editor验证 HOT 1
- 新建项目添加响应信息,报服务器内部错误
- nei的线上环境无法访问了 HOT 7
- nei.netease.com 停服通告 HOT 7
- Debian 10.6全局安装nej成功后,使用nej命令报错: nej: not found HOT 1
- 【测试中】线上数据的导出方式 HOT 10
- 接口导入私有化项目后数据数组和Object数据结构错误 HOT 2
- 私有化部署后数据导入的问题
- 导入json后,数据模型中 Array Object 中字段错误(偏移)
- 如何连接Docker部署的MySQL数据库
- 导出接口文档,object类型的字段没有子节点的信息 HOT 3
- 接口导入信息补全 HOT 1
- 自己电脑使用容器部署的,但界面显示不完整 HOT 1
- 私有部署使用exportjson数据无法导入,服务端报错ER_NO_DEFAULT_FOR_FIELD HOT 1
- 项目运行后, 有管理员账户吗? HOT 1
- 本地部署登录无响应 HOT 1
- > 刚发现NEI关了打不开了,请问现在还可以导出数据吗? HOT 1
- 进行到npm run build的时候遇到 Cannot read properties of undefined (reading 'sprite')
- 导出文档时,数据模型和接口对应错乱
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from nei.