gyp info it worked if it ends with ok
gyp info using [email protected]
gyp info using [email protected] | linux | x64
gyp http GET https://nodejs.org/dist/v0.12.7/node-v0.12.7.tar.gz
gyp http 200 https://nodejs.org/dist/v0.12.7/node-v0.12.7.tar.gz
gyp http GET https://nodejs.org/dist/v0.12.7/SHASUMS256.txt
gyp http 200 https://nodejs.org/dist/v0.12.7/SHASUMS256.txt
gyp info spawn python
gyp info spawn args [ '/nodejs/lib/node_modules/node-gyp/gyp/gyp_main.py’,
gyp info spawn args 'binding.gyp’,
gyp info spawn args '-f’,
gyp info spawn args 'make’,
gyp info spawn args '-I’,
gyp info spawn args '/home/ec2-user/login/build/config.gypi’,
gyp info spawn args '-I’,
gyp info spawn args '/nodejs/lib/node_modules/node-gyp/addon.gypi’,
gyp info spawn args '-I’,
gyp info spawn args '/root/.node-gyp/0.12.7/common.gypi’,
gyp info spawn args '-Dlibrary=shared_library’,
gyp info spawn args '-Dvisibility=default’,
gyp info spawn args '-Dnode_root_dir=/root/.node-gyp/0.12.7’,
gyp info spawn args '-Dnode_gyp_dir=/nodejs/lib/node_modules/node-gyp’,
gyp info spawn args '-Dmodule_root_dir=/home/ec2-user/login’,
gyp info spawn args '–depth=.’,
gyp info spawn args '–no-parallel’,
gyp info spawn args '–generator-output’,
gyp info spawn args ‘build’,
gyp info spawn args '-Goutput_dir=.’ ]
gyp: binding.gyp not found (cwd: /home/ec2-user/login) 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 (/nodejs/lib/node_modules/node-gyp/lib/configure.js:357:16)
gyp ERR! stack at ChildProcess.emit (events.js:110:17)
gyp ERR! stack at Process.ChildProcess._handle.onexit (child_process.js:1074:12)
gyp ERR! System Linux 3.14.35-28.38.amzn1.x86_64
gyp ERR! command “node” “/nodejs/bin/node-gyp” “configure”
gyp ERR! cwd /home/ec2-user/login
gyp ERR! node -v v0.12.7
gyp ERR! node-gyp -v v2.0.2
gyp ERR! not ok
请问 binding.gyp 这个文件是自动生成的吗?(因为我之前在另一个linux环境中运行通过的),而且在git的node-gyp上也没有看到关于binding.gyp 这个文件是必需自己手动创建的说明!
自己创建一个也可以 但是对里面的参数不是太了解需要怎样配! 求大神指导。
借楼问一下,为啥运行node-gyp configure
的时候,会去download一份node呢?我的node是windows下v0.11.14的,每次执行node-gyp configure
,去download的时候都说找不到这个版本的下载包,导致node-gyp configure
失败
@hwoarangzk 有download么?!
之后发现,感觉其实不用单独node-gyp configure 的 安装了node-gyp之后 配置好python 然后在项目根目录再次运行 npm install的时候 它就是自动 再运行node-gyp 根据你的系统的做对应包的插件安装。
而node-gyp configure 是需要自己写插件的时候才需要用到,至于自己写插件这种情况还没有遇到。建议可以按着官方API的例子试一下