`

npm install时node-gyp rebuild 卡住解决办法

阅读更多

问题描述:

npm install 时卡在node-gyp rebuild步骤无反应:

 

排查:

删掉项目的node_module目录,重新执行

npm install --loglevel verbose

 

最后几行日志如下:

 

gyp verb get node dir no --target version specified, falling back to host node version: 12.16.1
gyp verb command install [ '12.16.1' ]
gyp verb install input version string "12.16.1"
gyp verb install installing version: 12.16.1
gyp verb install --ensure was passed, so won't reinstall if already installed
gyp verb install version is already installed, need to check "installVersion"
gyp verb got "installVersion" 0
gyp verb needs "installVersion" 9
gyp verb install version is no good; reinstalling
gyp verb ensuring nodedir is created /Users/duwenbo/Library/Caches/node-gyp/12.16.1
gyp http GET https://nodejs.org/download/release/v12.16.1/node-v12.16.1-headers.tar.gz

 

分析解决:

  1. 根据日志描述,进入目录/Users/duwenbo/Library/Caches/node-gyp/12.16.1,发现目录中没有文件
  2. 下载https://nodejs.org/download/release/v12.16.1/node-v12.16.1-headers.tar.gz
  3. 解压至/Users/duwenbo/Library/Caches/node-gyp/12.16.1
  4. 在Users/duwenbo/Library/Caches/node-gyp/12.16.1目录建一个文本文件installVersion,文件内容只有一个9
  5. 删掉项目的node_module目录,重新执行npm install --loglevel verbose,执行成功

最终/Users/duwenbo/Library/Caches/node-gyp/12.16.1目录结构如下

├── include
│   	└── node
└──installVersion

 

duwenbodeMacBook-Air:12.16.1 duwenbo$ cat installVersion 
9

 

0
0
分享到:
评论

相关推荐

    node-directory-player:一个React性的“ Node Meteor GUI”文件系统目录播放器

    节点目录播放器 该项目的目的是创建一个图形用户界面(GUI)播放器,将其库直接映射到用户所选的Music/文件夹。 播放列表是直接从文件夹中读取的内容 ... 这应该通过运行node-gyp rebuild node-gyp依赖关系

    electron-rebuild:用于针对当前安装的Electron版本重建本机Node.js模块的软件包

    使用--save-dev安装软件包: npm install --save-dev electron-rebuild 然后,每当您安装新的npm软件包时,请重新运行electron-rebuild: $( npm bin ) /electron-rebuild 或者,如果您使用的是Windows: ....

    nodectp:ctp的nodejs接口

    npm install --global --production windows-build-tools cp binding-windows32.gyp binding.gy (cp binding-windows64.gyp binding.gy) node-gyp rebuild #代码里面或者系统PATH中设置ctp的dll的路径 node ./test/...

    nodegit:编码后的

    node-gyp rebuild --debug (与node-gyp clean configure --debug build )请注意,您应该运行rm -rf build/Release (或Windows中的rd /s /q build/Release )以确保发布构建不会加载而不是调试构建。 如果您要在...

    node_xslt:一个简单的针对节点的XSLT插件

    在根目录中,运行node-gyp rebuild ./build/Release/node_xslt.node node-gyp rebuild生成./build/Release/node_xslt.node 然后: var xslt = require ( 'node_xslt' ) 要求 (基于Debian的发行版的libxml2-dev...

    client:眼动追踪键盘的电子用户界面

    眼动追踪客户端关于该应用程序利用我们的自定义模块将Tobii眼动跟踪设备绑定到虚拟键盘,从而使用户可以用自己的眼睛打字... npm install -g node-gyp npm run eyetracking-rebuild 运行应用npm run start CSE 4317文档

    nodejs-fdf:使用 nodejs 创建 FDF 文件

    首先你必须安装 node-gyp npm -g install node-gyp rebuild之后,您可以安装 fdf 模块 git clone https://github.com/agrippa1994/nodejs-fdf.gitnpm install nodejs-fdf/rm -rf nodejs-fdf/如何在脚本中使用此模块...

    node-opencl:在 V8 Node.js 中为 OpenCL 自动生成绑定的实验

    节点opencl 在 V8/Node.js 中为 OpenCL 自动生成绑定的实验。 这使用了 JNAerator 的新 node.js 目标,并重用了 ref 和 ref-array 模块。... npm install -g node-gyp node-gyp rebuild 测试: npm test

    AntV.G2进行npm install时报错

    G2-master安装时报错如下: ...> (node install/libvips && node install/dll-copy && prebuild-install) || (node-gyp rebuild && node install/dll-copy) info sharp Using cached C:\Users\maizi\AppData\Roa

    iOS-2-Androit-Assets:将 iOS 风格的 Assets 重命名和调整为 Android 风格的 Drawable

    iOS-2-Android-Assets 描述 将 iOS 风格的 Assets 重命名和调整为 Android 风格的 Drawable 开始之前 在你的驱动器上克隆这个 git ...npm install -g nw-gyp cd node_modules/lwip/ nw-gyp rebuild --target=0.11.5

    nan_eigen_addon

    $ node-gyp rebuild $ node ./ (基于示例) 注意:此插件的gyp文件假定存在..\\eigen-eigen-10219c95fe65\\文件夹..\\eigen-eigen-10219c95fe65\\并且包含上述Eigen库文件。 要使用其他版本的Eigen,只需将..\\...

    electron-react-app:电子样板可进行React,扩展了create-react-app

    npm install -g electron-builder 建造Commands: electron-builder build Build [default] electron-builder install-app-deps Install app deps electron-builder node-gyp-rebuild Rebuild own

    Neobombe:Bombe的简化软件和硬件仿真

    新邦贝 Bombe的简化仿真,该仿真与Arduino相连以移动转子。... 转到node_modules/serialport文件夹并输入HOME=~/.electron-gyp node-gyp rebuild --target=0.29.2 --arch=ia64 --dist-url=https://atom.io/dow

    azurite:电子[WIP]绘画应用

    npm run node-gyp:build # build changed files only 运行应用 npm run app 测试 npm test 与webpack devserver # assuming you are running `npm run watch` npm run test:dev 套餐应用 npm run package 打包的...

    nodeClientSession:nodeClientSession

    客户端会话(用于nodejs的cookie会话) nodejs客户端cookie会话中间件,支持跨进程和多服务器,... node-gyp rebuild 要将模块包含在您的项目中: var cs = require('client-session'); 简单的例子 var http = req

    AR-lab:使用AR剪切和粘贴某人

    参赛作品名 AR + ML原型 作品简介 ...npm install -g node-gyp npx electron-rebuild -f -t prod,optional,dev -w robotjs 4首次运行在终端中输入本机密码,生成https证书。 手机跟电脑需在同一个预设里

    skip-postinstall:通过设置环境变量跳过安装后脚本的一种简单的跨平台方法

    -dev skip-postinstall 新产品管理: npm install --save-dev skip-postinstall 添加skip-postinstall || 到您的安装后脚本: { " scripts " : { " postinstall " : " skip-postinstall || node-gyp rebuild " ...

    tablespoon-desktop:用于汤匙的桌面客户端

    node-gyp rebuild --target=0.26.1 --arch=x64 --target_platform=linux --dist-url=https://atom.io/download/atom-shell --module_name=node_sqlite3 --module_path=../lib/binding/node-v43-linux-x64 ...

    ReaAntKour.github.io

    第三,将cd放入“ src”分支的src /目录中,并键入npm install以下载构建和部署系统所需的库: $ npm install> fsevents@1.2.12 install /Users/philipjohnson/github/csdl/csdl.github.io/src/node_modules/jest-...

    midisock:MIDIsock 服务器客户端

    迷笛套 一个允许无线发送 MIDI 信息的程序。 要求 节点.js nw.js v0.8.6 C/C++ 编译器,例如 GCC Python 服务器要求 ...sudo npm install -g nw-gyp cd node_modules/midi nw-gyp rebuild --target=0.8.6

Global site tag (gtag.js) - Google Analytics