gpt4 book ai didi

node.js - 使用 npm 安装 v8-profiler

转载 作者:搜寻专家 更新时间:2023-10-31 23:38:59 25 4
gpt4 key购买 nike

在尝试中

npm install -g v8-profiler

我遇到了以下错误:

..\graph_node.cc(99): error C2039: 'GetRetainersCount' : is not a member of 'v8::HeapGraphNode' [C:\Users\username\AppData\Roaming\npm\node_modules\v8
-profiler\build\profiler.vcxproj]
C:\Users\username\.node-gyp\0.10.15\deps\v8\include\v8-profiler.h(249) : see declaration of 'v8::HeapGraphNode'
..\graph_node.cc(132): error C2039: 'GetRetainedSize' : is not a member of 'v8::HeapGraphNode' [C:\Users\username\AppData\Roaming\npm\node_modules\v8-
profiler\build\profiler.vcxproj]
C:\Users\username\.node-gyp\0.10.15\deps\v8\include\v8-profiler.h(249) : see declaration of 'v8::HeapGraphNode'
..\graph_node.cc(154): error C2039: 'GetRetainer' : is not a member of 'v8::HeapGraphNode' [C:\Users\username\AppData\Roaming\npm\node_modules\v8-prof
iler\build\profiler.vcxproj]
C:\Users\username\.node-gyp\0.10.15\deps\v8\include\v8-profiler.h(249) : see declaration of 'v8::HeapGraphNode'
..\graph_node.cc(162): error C2039: 'GetDominatorNode' : is not a member of 'v8::HeapGraphNode' [C:\Users\username\AppData\Roaming\npm\node_modules\v8
-profiler\build\profiler.vcxproj]
C:\Users\username\.node-gyp\0.10.15\deps\v8\include\v8-profiler.h(249) : see declaration of 'v8::HeapGraphNode'
profiler.cc

看起来像是一个编译问题。可能出了什么问题?我的系统有:

  1. Visual Studio 2010
  2. Windows SDK 7.1 注意:如果你在安装时遇到错误,可能是这个链接将为您提供帮助。
  3. Visual Studio 2010 SP1
  4. 适用于 Windows SDK 7.1 的 Visual C++ 2010 SP1 编译器更新
  5. python 2.7

如中所述:https://github.com/TooTallNate/node-gyp/wiki/Visual-Studio-2010-Setup

最佳答案

我刚遇到同样的问题。看起来像 NodeFly's fork of v8-profiler包含 Sean 描述的修复,所以我安装了那个版本:

npm install nodefly-v8-profiler

关于node.js - 使用 npm 安装 v8-profiler,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/18039287/

25 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com