1

我试图让这个节点时间运行,但似乎有一些我无法弄清楚的问题。我完全按照指南所说的那样做,所以我应该得到以下信息:

启动应用程序后,格式为 https://nodetime.com/[session_id] 的链接将打印到控制台,其中会话将是您访问分析器服务器的唯一 ID

它结束控制台没有显示任何会话ID链接,只有这个:

23 Aug 13:32:23 - Nodetime: profiler resumed for 180 seconds

也许你们中的任何人都遇到过同样的问题?寻找修复!提前致谢!

以下是我在 nodetime 安装后得到的结果,我遇到了一些 Python 错误,但似乎仍然是成功安装...

npm WARN package.json application-name@0.0.1 No README.md file found!
npm WARN package.json jade@0.26.3 No README.md file found!
npm http GET http://registry.npmjs.org/nodetime
npm http 200 http://registry.npmjs.org/nodetime
npm http GET http://registry.npmjs.org/nodetime/-/nodetime-0.4.5.tgz
npm http 200 http://registry.npmjs.org/nodetime/-/nodetime-0.4.5.tgz
npm http GET http://registry.npmjs.org/request/2.10.0
npm http GET http://registry.npmjs.org/v8tools
npm http GET http://registry.npmjs.org/timekit
npm http 200 http://registry.npmjs.org/request/2.10.0
npm http GET http://registry.npmjs.org/request/-/request-2.10.0.tgz
npm http 200 http://registry.npmjs.org/v8tools
npm http GET http://registry.npmjs.org/v8tools/-/v8tools-0.1.1.tgz
npm http 200 http://registry.npmjs.org/timekit
npm http GET http://registry.npmjs.org/timekit/-/timekit-0.1.9.tgz
npm http 200 http://registry.npmjs.org/v8tools/-/v8tools-0.1.1.tgz
npm http 200 http://registry.npmjs.org/request/-/request-2.10.0.tgz
npm http 200 http://registry.npmjs.org/timekit/-/timekit-0.1.9.tgz
npm http GET http://registry.npmjs.org/bindings
npm http 200 http://registry.npmjs.org/bindings

> timekit@0.1.9 install C:\Users\TJIA\Desktop\Sommarjobb\Extrauppgifter\demo\nod
e_modules\nodetime\node_modules\timekit
> node-gyp rebuild


> v8tools@0.1.1 install C:\Users\TJIA\Desktop\Sommarjobb\Extrauppgifter\demo\nod
e_modules\nodetime\node_modules\v8tools
> node-gyp rebuild


C:\Users\TJIA\Desktop\Sommarjobb\Extrauppgifter\demo\node_modules\nodetime\node_
modules\timekit>node "C:\Program Files (x86)\nodejs\node_modules\npm\bin\node-gy
p-bin\\..\..\node_modules\node-gyp\bin\node-gyp.js" rebuild

C:\Users\TJIA\Desktop\Sommarjobb\Extrauppgifter\demo\node_modules\nodetime\node_
modules\v8tools>node "C:\Program Files (x86)\nodejs\node_modules\npm\bin\node-gy
p-bin\\..\..\node_modules\node-gyp\bin\node-gyp.js" rebuild
gyp ERR! configure error
gyp ERR! stack Error: Can't find Python executable "python", you can set the PYT
HON env variable.
gyp ERR! stack     at failNoPython (C:\Program Files (x86)\nodejs\node_modules\n
pm\node_modules\node-gyp\lib\configure.js:110:14)
gyp ERR! stack     at C:\Program Files (x86)\nodejs\node_modules\npm\node_module
s\node-gyp\lib\configure.js:74:11
gyp ERR! stack     at Object.oncomplete (fs.js:297:15)
gyp gypERR!  System Windows_NT 6.1.7601
ERR! gyp configure errorERR!
 command "node" "C:\\Program Files (x86)\\nodejs\\node_modules\\npm\\node_module
s\\node-gyp\\bin\\node-gyp.js" "rebuild"
gyp ERR! cwd C:\Users\TJIA\Desktop\Sommarjobb\Extrauppgifter\demo\node_modules\n
odetime\node_modules\timekit
gypgyp  ERR! node -v v0.8.5
gyp ERR! node-gyp -v v0.6.3
gyp ERR! not ok
ERR! stack Error: Can't find Python executable "python", you can set the PYTHON
env variable.
gyp ERR! stack     at failNoPython (C:\Program Files (x86)\nodejs\node_modules\n
pm\node_modules\node-gyp\lib\configure.js:110:14)
gyp ERR! stack     at C:\Program Files (x86)\nodejs\node_modules\npm\node_module
s\node-gyp\lib\configure.js:74:11
gyp ERR! stack     at Object.oncomplete (fs.js:297:15)
gyp ERR! System Windows_NT 6.1.7601
gyp ERR! command "node" "C:\\Program Files (x86)\\nodejs\\node_modules\\npm\\nod
e_modules\\node-gyp\\bin\\node-gyp.js" "rebuild"
gyp ERR! cwd C:\Users\TJIA\Desktop\Sommarjobb\Extrauppgifter\demo\node_modules\n
odetime\node_modules\v8tools
gyp ERR! node -v v0.8.5
gyp ERR! node-gyp -v v0.6.3
gyp ERR! not ok
npm WARN optional dep failed, continuing timekit@0.1.9
npm WARN optional dep failed, continuing v8tools@0.1.1
nodetime@0.4.5 node_modules\nodetime
+-- request@2.10.0
4

2 回答 2

1

成功构建nodetime. 先安装python。然后重新安装nodetime

于 2012-08-23T12:05:52.253 回答
1

npm 无法安装 nodetime 的可选依赖项:timekit 和 v8tools(C 绑定),原因在上一个答案中正确提及(缺少 python)。尽管即使没有这些模块,它也应该可以使用(尽管有一些功能将不起作用,例如 CPU 和堆分析)。

如果您的初始化看起来像这样require('nodetime').profile(),即没有任何参数的 profile() 调用,那么除了失败的可选依赖项之外还有其他问题。使用调试标志查看问题所在:require('nodetime').profile({debug: true}). 可能与网络有关,等等。

如果您使用的是 Nodetime Pro,并且在配置文件调用中包含了您的帐户密钥和应用程序名称,即require('nodetime').profile({accountKey: '...', appName: '...'}),那么您的应用程序应该会在登录 nodetime.com 后出现在您的应用程序页面上。在这种情况下,不会将会话链接打印到控制台。

于 2012-08-23T12:31:05.080 回答