Warning: file_get_contents(/data/phpspider/zhask/data//catemap/2/node.js/35.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181

Warning: file_get_contents(/data/phpspider/zhask/data//catemap/8/python-3.x/15.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
Node.js 节点gyp生成错误mac os x_Node.js_Macos_Gyp - Fatal编程技术网

Node.js 节点gyp生成错误mac os x

Node.js 节点gyp生成错误mac os x,node.js,macos,gyp,Node.js,Macos,Gyp,我已经进行了大量搜索,在任何地方都找不到我所面临的错误。在尝试构建节点gyp时,我收到以下错误消息: node-gyp build gyp info it worked if it ends with ok gyp info using node-gyp@3.3.1 gyp info using node@0.10.43 | darwin | x64 gyp WARN download NVM_NODEJS_ORG_MIRROR is deprecated and will be removed

我已经进行了大量搜索,在任何地方都找不到我所面临的错误。在尝试构建节点gyp时,我收到以下错误消息:

node-gyp build
gyp info it worked if it ends with ok
gyp info using node-gyp@3.3.1
gyp info using node@0.10.43 | darwin | x64
gyp WARN download NVM_NODEJS_ORG_MIRROR is deprecated and will be removed in node-gyp v4, please use NODEJS_ORG_MIRROR
gyp info spawn make
gyp info spawn args [ 'BUILDTYPE=Release', '-C', 'build' ]
make: *** No rule to make target `Release/obj.target/binding/src/binding.o', needed by `Release/binding.node'.  Stop.
gyp ERR! build error 
gyp ERR! stack Error: `make` failed with exit code: 2
gyp ERR! stack     at ChildProcess.onExit (/Users/alexbromage/.nvm/v0.10.43/lib/node_modules/node-   gyp/lib/build.js:276:23)
gyp ERR! stack     at ChildProcess.emit (events.js:98:17)
gyp ERR! stack     at Process.ChildProcess._handle.onexit (child_process.js:820:12)
gyp ERR! System Darwin 15.3.0
gyp ERR! command "node" "/Users/alexbromage/.nvm/v0.10.43/bin/node-gyp" "build"
gyp ERR! cwd /Users/alexbromage
gyp ERR! node -v v0.10.43
gyp ERR! node-gyp -v v3.3.1
gyp ERR! not ok 
我的binding.gyp文件如下所示:

{
  "targets": [
    {
      "target_name": "binding",
      "sources": [ "src/binding.cc" ]
    }
  ]
}

我认为我的源代码引用不正确,但我找不到正确的设置。感谢任何帮助通常在发生此错误时,
源文件路径不正确。

确实
src/binding.cc
(相对于
binding.gyp
所在的目录)实际存在?不存在。我的binding.gyp在我的主目录中,所以将其更改为~/binding.gyp有效吗?我猜是这样,但应该是什么?binding.gyp文件的位置?通常您将
binding.gyp
放在项目的根目录中,然后有
src/
和其他相关路径。有了这种布局,您的
源代码应该可以正常工作(假设您在
src/
中有一个名为
binding.cc
的文件。这就是为什么我会感到困惑的原因,因为我根本没有src/而且我已经完全按照安装说明进行了安装!那么您的源文件在哪里?只需相应地更改
sources
中的路径即可。如果您正在学习教程,它会有所帮助。)pful在你的问题中也发布了一个链接。因此我已经搜索过了,但我的硬盘上没有src文件夹或binding.cc文件夹。因此我无法找到来源。