`

npm node-gyp rebuild - Error: `gyp` failed with exit code: 1

    博客分类:
  • npm
阅读更多

报错内容可能不一样:

gyp: Call to './util/has_lib.sh freetype' returned exit status 0 while in binding.gyp. while trying to load binding.gyp
gyp ERR! configure error 
gyp ERR! stack Error: `gyp` failed with exit code: 1
gyp ERR! stack     at ChildProcess.onCpExit (/home/xxx/.nvm/versions/node/v7.8.0/lib/node_modules/npm/node_modules/node-gyp/lib/configure.js:308:16)
gyp ERR! stack     at emitTwo (events.js:106:13)
gyp ERR! stack     at ChildProcess.emit (events.js:194:7)
gyp ERR! stack     at Process.ChildProcess._handle.onexit (internal/child_process.js:215:12)
gyp ERR! System Linux 4.13.0-45-generic
gyp ERR! command "/home/xxx/.nvm/versions/node/v7.8.0/bin/node" "/home/xxx/.nvm/versions/node/v7.8.0/lib/node_modules/npm/node_modules/node-gyp/bin/node-gyp.js" "rebuild"
gyp ERR! cwd /home/xxx/Dev/vue/node_modules/canvas
gyp ERR! node -v v7.8.0
gyp ERR! node-gyp -v v3.5.0

 

解决方案:

~$ rm -rf ~/.node-gyp/

~$ npm i -g node-gyp

~$ rm -rf 项目/node_modules

~$ npm i -d

 

 

refs:

https://github.com/nodejs/node-gyp/issues/809

 

https://github.com/Automattic/node-canvas/wiki/Installation%3A-Ubuntu-and-other-Debian-based-systems

$ sudo apt update 
$ sudo apt install build-essential libcairo2-dev libpango1.0-dev libjpeg-dev libgif-dev librsvg2-dev 
分享到:
评论

相关推荐

    NPM Error:gyp: No Xcode or CLT version detected!

    > node-gyp rebuild No receipt for 'com.apple.pkg.CLTools_Executables' found at '/'. No receipt for 'com.apple.pkg.DeveloperToolsCLILeo' found at '/'. No receipt for '...

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

    电子重建 该可执行文件将根据您的Electron项目使用的Node.js版本重建本机Node.js模块。... bin \e lectron-rebuild.cmd 如果您具有良好的node-gyp配置,但是看到有关Windows上缺少元素的错误,例如Could not lo

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

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

    nodectp:ctp的nodejs接口

    node-gyp rebuild #代码里面或者系统PATH中设置ctp的dll的路径 node ./test/mduser.js #node ./test/tduser.js linux cp binding-linux.gyp binding.gy node-gyp rebuild node ./test/mduser.js #node ./test/tduser...

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

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

    nc-screen:Nodejs C ++插件获取设备屏幕尺寸

    数控屏Nodejs C ++插件获取设备屏幕尺寸编译sudo yarn test 或者sudo npm run test待办事项清单打字稿npm脚本: node-gyp build和node-gyp rebuild之间有什么区别捕获错误边界参考

    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...

    ElectroLite:电子+角+ Sqlite3

    ElectroLite Electron + Angular + Sqlite桌面应用程序 ...node-gyp rebuild --target=0.30.3 --arch=x64 --target_platform=darwin --dist-url=https://atom.io/download/atom-shell --module_name=node_sqlite3 --

    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

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

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

    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 ...

    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

    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/如何在脚本中使用此模块...

    nodegit:编码后的

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

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

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

    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 打包的...

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

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

    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证书。 手机跟电脑需在同一个预设里

    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

Global site tag (gtag.js) - Google Analytics