简体   繁体   English

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

[英]Node.js v8-profiler module won't install on Node v8.1.0 on OSX

I ran a yarn add v8-profiler command in OSX terminal.我在 OSX 终端中运行了yarn add v8-profiler命令。 But I get this error.但我收到这个错误。 It says the file node-v57-darwin-x64.tar.gz is not available so it tries to build with node-gyp.它说文件 node-v57-darwin-x64.tar.gz 不可用,因此它尝试使用 node-gyp 构建。 But there is some problem with node-gyp in my local machine.但是我的本地机器上的 node-gyp 存在一些问题。 (I can't download XCode because the internal wireless adapter on my Macbook doesn't work). (我无法下载 XCode,因为我的 Macbook 上的内置无线适配器不起作用)。 What can I do to solve this problem?我能做些什么来解决这个问题?

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)

There's another node package that handles V8 profiling with node 8+还有另一个节点包可以处理节点 8+ 的 V8 分析

V8-profiler-node8 V8-profiler-node8

It supports all platforms and all node versions so far (see package home page for more information)到目前为止,它支持所有平台和所有节点版本(有关更多信息,请参阅包主页)

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM