Node.js v8-profiler模块不会安装在OSX上的Node v8.1.0上

时间:2017-07-25 09:52:23

标签: node.js

我在OSX终端中运行了yarn add v8-profiler命令。但是我得到了这个错误。它说文件node-v57-darwin-x64.tar.gz不可用,因此它尝试使用node-gyp进行构建。但是我的本地机器中的node-gyp存在一些问题。 (我无法下载XCode,因为我的Macbook上的内部无线适配器不起作用)。我该怎么做才能解决这个问题?

Output:
node-pre-gyp info it worked if it ends with ok
node-pre-gyp info using node-pre-gyp@0.6.34
node-pre-gyp info using node@8.1.0 | darwin | x64
node-pre-gyp info check checked for "/node_projects/project/node_modules/v8-profiler/build/profiler/v5.7.0/node-v57-darwin-x64/profiler.node" (not found)
node-pre-gyp http GET https://node-inspector.s3.amazonaws.com/profiler/v5.7.0/node-v57-darwin-x64.tar.gz
node-pre-gyp http 404 https://node-inspector.s3.amazonaws.com/profiler/v5.7.0/node-v57-darwin-x64.tar.gz
node-pre-gyp ERR! Tried to download(404): https://node-inspector.s3.amazonaws.com/profiler/v5.7.0/node-v57-darwin-x64.tar.gz 
node-pre-gyp ERR! Pre-built binaries not found for v8-profiler@5.7.0 and node@8.1.0 (node-v57 ABI) (falling back to source compile with node-gyp) 
node-pre-gyp http 404 status code downloading tarball https://node-inspector.s3.amazonaws.com/profiler/v5.7.0/node-v57-darwin-x64.tar.gz 
node-pre-gyp ERR! build error 
node-pre-gyp ERR! stack Error: Failed to execute 'node-gyp clean' (Error: spawn node-gyp ENOENT)
node-pre-gyp ERR! stack     at ChildProcess.<anonymous> (/node_projects/project/node_modules/node-pre-gyp/lib/util/compile.js:77:29)
node-pre-gyp ERR! stack     at emitOne (events.js:115:13)
node-pre-gyp ERR! stack     at ChildProcess.emit (events.js:210:7)
node-pre-gyp ERR! stack     at Process.ChildProcess._handle.onexit (internal/child_process.js:195:12)
node-pre-gyp ERR! stack     at onErrorNT (internal/child_process.js:366:16)
node-pre-gyp ERR! stack     at _combinedTickCallback (internal/process/next_tick.js:102:11)
node-pre-gyp ERR! stack     at process._tickCallback (internal/process/next_tick.js:161:9)
node-pre-gyp ERR! System Darwin 14.5.0
node-pre-gyp ERR! command "/usr/local/Cellar/node/8.1.0_1/bin/node" "/node_projects/project/node_modules/v8-profiler/node_modules/.bin/node-pre-gyp" "install" "--fallback-to-build"
node-pre-gyp ERR! cwd /node_projects/project/node_modules/v8-profiler
node-pre-gyp ERR! node -v v8.1.0
node-pre-gyp ERR! node-pre-gyp -v v0.6.34
node-pre-gyp ERR! not ok 
Failed to execute 'node-gyp clean' (Error: spawn node-gyp ENOENT)

1 个答案:

答案 0 :(得分:0)

还有另一个节点包,用于处理节点8+的V8配置文件

V8-profiler-node8

到目前为止,它支持所有平台和所有节点版本(有关更多信息,请参见软件包主页)