gyp:找不到绑定.gyp
我正在尝试安装运行我的网络应用程序所需的模块。我在运行 $npm install
时收到以下错误:
john@mylaptop frontend % npm install
> [email protected] install /Users/john/workspace/myproject/frontend/node_modules/watchpack/node_modules/fsevents
> node-gyp rebuild
gyp: binding.gyp not found (cwd: /Users/john/workspace/myproject/frontend/node_modules/watchpack/node_modules/fsevents) 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 (/Users/john/.nvm/versions/node/v6.11.0/lib/node_modules/npm/node_modules/node-gyp/lib/configure.js:305:16)
gyp ERR! stack at emitTwo (events.js:106:13)
gyp ERR! stack at ChildProcess.emit (events.js:191:7)
gyp ERR! stack at Process.ChildProcess._handle.onexit (internal/child_process.js:215:12)
gyp ERR! System Darwin 21.3.0
gyp ERR! command "/Users/john/.nvm/versions/node/v6.11.0/bin/node" "/Users/john/.nvm/versions/node/v6.11.0/lib/node_modules/npm/node_modules/node-gyp/bin/node-gyp.js" "rebuild"
gyp ERR! cwd /Users/john/workspace/myproject/frontend/node_modules/watchpack/node_modules/fsevents
gyp ERR! node -v v6.11.0
gyp ERR! node-gyp -v v3.4.0
gyp ERR! not ok
npm WARN optional SKIPPING OPTIONAL DEPENDENCY: [email protected] (node_modules/watchpack/node_modules/fsevents):
npm WARN optional SKIPPING OPTIONAL DEPENDENCY: [email protected] install: `node-gyp rebuild`
npm WARN optional SKIPPING OPTIONAL DEPENDENCY: Exit status 1
john@mylaptop frontend % node-gyp rebuild --verbose
gyp info it worked if it ends with ok
gyp verb cli [ '/Users/john/.nvm/versions/node/v6.11.0/bin/node',
gyp verb cli '/Users/john/.nvm/versions/node/v6.11.0/bin/node-gyp',
gyp verb cli 'rebuild',
gyp verb cli '--verbose' ]
gyp info using [email protected]
gyp info using [email protected] | darwin | x64
gyp verb command rebuild []
gyp verb command clean []
gyp verb clean removing "build" directory
gyp verb command configure []
gyp ERR! UNCAUGHT EXCEPTION
gyp ERR! stack /Users/john/.nvm/versions/node/v6.11.0/lib/node_modules/node-gyp/lib/create-config-gypi.js:18
gyp ERR! stack async function getBaseConfigGypi ({ gyp, nodeDir }) {
gyp ERR! stack ^^^^^^^^
gyp ERR! stack SyntaxError: Unexpected token function
gyp ERR! stack at createScript (vm.js:56:10)
gyp ERR! stack at Object.runInThisContext (vm.js:97:10)
gyp ERR! stack at Module._compile (module.js:542:28)
gyp ERR! stack at Object.Module._extensions..js (module.js:579:10)
gyp ERR! stack at Module.load (module.js:487:32)
gyp ERR! stack at tryModuleLoad (module.js:446:12)
gyp ERR! stack at Function.Module._load (module.js:438:3)
gyp ERR! stack at Module.require (module.js:497:17)
gyp ERR! stack at require (internal/module.js:20:19)
gyp ERR! stack at Object.<anonymous> (/Users/john/.nvm/versions/node/v6.11.0/lib/node_modules/node-gyp/lib/configure.js:10:26)
gyp ERR! System Darwin 21.3.0
gyp ERR! command "/Users/john/.nvm/versions/node/v6.11.0/bin/node" "/Users/john/.nvm/versions/node/v6.11.0/bin/node-gyp" "rebuild" "--verbose"
gyp ERR! cwd /Users/john/workspace/myproject/frontend
gyp ERR! node -v v6.11.0
gyp ERR! node-gyp -v v8.4.1
gyp ERR! Node-gyp failed to build your package.
gyp ERR! Try to update npm and/or node-gyp and if it does not help file an issue with the package author.
这是我正在使用的节点版本:
john@mylaptop frontend % npm version
{ frontend: '0.0.0',
npm: '3.10.10',
ares: '1.10.1-DEV',
http_parser: '2.7.0',
icu: '58.2',
modules: '48',
node: '6.11.0',
openssl: '1.0.2k',
uv: '1.11.0',
v8: '5.1.281.102',
zlib: '1.2.11' }
我不想升级 与 Angular 的兼容性原因 4.4.6.请提供任何帮助。 Node是通过nvm安装的,而不是通过brew安装的。
I am trying to install the necessary modules for running my web application. I am getting the following error while running $npm install
:
john@mylaptop frontend % npm install
> [email protected] install /Users/john/workspace/myproject/frontend/node_modules/watchpack/node_modules/fsevents
> node-gyp rebuild
gyp: binding.gyp not found (cwd: /Users/john/workspace/myproject/frontend/node_modules/watchpack/node_modules/fsevents) 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 (/Users/john/.nvm/versions/node/v6.11.0/lib/node_modules/npm/node_modules/node-gyp/lib/configure.js:305:16)
gyp ERR! stack at emitTwo (events.js:106:13)
gyp ERR! stack at ChildProcess.emit (events.js:191:7)
gyp ERR! stack at Process.ChildProcess._handle.onexit (internal/child_process.js:215:12)
gyp ERR! System Darwin 21.3.0
gyp ERR! command "/Users/john/.nvm/versions/node/v6.11.0/bin/node" "/Users/john/.nvm/versions/node/v6.11.0/lib/node_modules/npm/node_modules/node-gyp/bin/node-gyp.js" "rebuild"
gyp ERR! cwd /Users/john/workspace/myproject/frontend/node_modules/watchpack/node_modules/fsevents
gyp ERR! node -v v6.11.0
gyp ERR! node-gyp -v v3.4.0
gyp ERR! not ok
npm WARN optional SKIPPING OPTIONAL DEPENDENCY: [email protected] (node_modules/watchpack/node_modules/fsevents):
npm WARN optional SKIPPING OPTIONAL DEPENDENCY: [email protected] install: `node-gyp rebuild`
npm WARN optional SKIPPING OPTIONAL DEPENDENCY: Exit status 1
john@mylaptop frontend % node-gyp rebuild --verbose
gyp info it worked if it ends with ok
gyp verb cli [ '/Users/john/.nvm/versions/node/v6.11.0/bin/node',
gyp verb cli '/Users/john/.nvm/versions/node/v6.11.0/bin/node-gyp',
gyp verb cli 'rebuild',
gyp verb cli '--verbose' ]
gyp info using [email protected]
gyp info using [email protected] | darwin | x64
gyp verb command rebuild []
gyp verb command clean []
gyp verb clean removing "build" directory
gyp verb command configure []
gyp ERR! UNCAUGHT EXCEPTION
gyp ERR! stack /Users/john/.nvm/versions/node/v6.11.0/lib/node_modules/node-gyp/lib/create-config-gypi.js:18
gyp ERR! stack async function getBaseConfigGypi ({ gyp, nodeDir }) {
gyp ERR! stack ^^^^^^^^
gyp ERR! stack SyntaxError: Unexpected token function
gyp ERR! stack at createScript (vm.js:56:10)
gyp ERR! stack at Object.runInThisContext (vm.js:97:10)
gyp ERR! stack at Module._compile (module.js:542:28)
gyp ERR! stack at Object.Module._extensions..js (module.js:579:10)
gyp ERR! stack at Module.load (module.js:487:32)
gyp ERR! stack at tryModuleLoad (module.js:446:12)
gyp ERR! stack at Function.Module._load (module.js:438:3)
gyp ERR! stack at Module.require (module.js:497:17)
gyp ERR! stack at require (internal/module.js:20:19)
gyp ERR! stack at Object.<anonymous> (/Users/john/.nvm/versions/node/v6.11.0/lib/node_modules/node-gyp/lib/configure.js:10:26)
gyp ERR! System Darwin 21.3.0
gyp ERR! command "/Users/john/.nvm/versions/node/v6.11.0/bin/node" "/Users/john/.nvm/versions/node/v6.11.0/bin/node-gyp" "rebuild" "--verbose"
gyp ERR! cwd /Users/john/workspace/myproject/frontend
gyp ERR! node -v v6.11.0
gyp ERR! node-gyp -v v8.4.1
gyp ERR! Node-gyp failed to build your package.
gyp ERR! Try to update npm and/or node-gyp and if it does not help file an issue with the package author.
This is the node version I am using :
john@mylaptop frontend % npm version
{ frontend: '0.0.0',
npm: '3.10.10',
ares: '1.10.1-DEV',
http_parser: '2.7.0',
icu: '58.2',
modules: '48',
node: '6.11.0',
openssl: '1.0.2k',
uv: '1.11.0',
v8: '5.1.281.102',
zlib: '1.2.11' }
I don't want to upgrade npm or node versions for compatibility reasons with angular 4.4.6. Any help please. node was installed via nvm and not with brew.
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
添加文件
binding.gyp
并重建node-gyp。
$node-gyp 重建
Add file
binding.gyp
and rebuid node-gyp.
$ node-gyp rebuild