試圖安裝上Windows7的V8-分析器(64位)如何在Windows 7上使用npm安裝v8-profiler?
npm install v8-profiler
注: 1.依存性的Python 2.7,我已安裝並設置將env。變種。也
已確認安裝了「Visual C++可再發行組件包」。
節點GYP模塊也安裝
但仍然拋出的錯誤如下:
D:\Projects\Projects\MY_Prjct3\MY_Prjct>npm install v8-profiler
npm http GET https://registry.npmjs.org/v8-profiler
npm http 304 https://registry.npmjs.org/v8-profiler
> [email protected] install D:\Projects\Projects\MY_Prjct3\MY_Prjct\node_modules\
v8-profiler
> node-gyp rebuild
D:\Projects\Projects\MY_Prjct3\MY_Prjct\node_modules\v8-profiler>node "C:\Program F
iles\nodejs\node_modules\npm\bin\node-gyp-bin\\..\..\node_modules\node-gyp\bin\n
ode-gyp.js" rebuild
C:\Program Files (x86)\MSBuild\Microsoft.Cpp\v4.0\Microsoft.Cpp.InvalidPlatform
.Targets(23,7): error MSB8007: The Platform for project 'profiler.vcxproj' is i
nvalid. Platform='x64'. You may be seeing this message because you are trying
to build a project without a solution file, and have specified a non-default Pl
atform that doesn't exist for this project. [D:\Projects\Projects\MY_Prjct3\My_Prj
ct\node_modules\v8-profiler\build\profiler.vcxproj]
gyp ERR! build error
gyp ERR! stack Error: `C:\Windows\Microsoft.NET\Framework\v4.0.30319\msbuild.exe
` failed with exit code: 1
gyp ERR! stack at ChildProcess.onExit (C:\Program Files\nodejs\node_modules\
npm\node_modules\node-gyp\lib\build.js:236:23)
gyp ERR! stack at ChildProcess.EventEmitter.emit (events.js:99:17)
gyp ERR! stack at Process._handle.onexit (child_process.js:678:10)
gyp ERR! System Windows_NT 6.1.7601
gyp ERR! command "node" "C:\\Program Files\\nodejs\\node_modules\\npm\\node_modu
les\\node-gyp\\bin\\node-gyp.js" "rebuild"
gyp ERR! cwd D:\Projects\Projects\MY_Prjct3\MY_Prjct\node_modules\v8-profiler
gyp ERR! node -v v0.8.15
gyp ERR! node-gyp -v v0.7.1
gyp ERR! not ok
npm ERR! [email protected] install: `node-gyp rebuild`
npm ERR! `cmd "/c" "node-gyp rebuild"` failed with 1
npm ERR!
npm ERR! Failed at the [email protected] install script.
npm ERR! This is most likely a problem with the v8-profiler package,
npm ERR! not with npm itself.
npm ERR! Tell the author that this fails on your system:
npm ERR! node-gyp rebuild
npm ERR! You can get their info via:
npm ERR! npm owner ls v8-profiler
npm ERR! There is likely additional logging output above.
npm ERR! System Windows_NT 6.1.7601
npm ERR! command "C:\\Program Files\\nodejs\\\\node.exe" "C:\\Program Files\\nod
ejs\\node_modules\\npm\\bin\\npm-cli.js" "install" "v8-profiler"
npm ERR! cwd D:\Projects\Projects\MY_Prjct3\MY_Prjct
npm ERR! node -v v0.8.15
npm ERR! npm -v 1.1.66
npm ERR! code ELIFECYCLE
npm ERR!
npm ERR! Additional logging details can be found in:
npm ERR! D:\Projects\Projects\MY_Prjct3\MY_Prjct\npm-debug.log
npm ERR! not ok code 0
文件:NPM-的debug.log
0 info it worked if it ends with ok
1 verbose cli [ 'C:\\Program Files\\nodejs\\\\node.exe',
1 verbose cli 'C:\\Program Files\\nodejs\\node_modules\\npm\\bin\\npm-cli.js',
1 verbose cli 'install',
1 verbose cli 'v8-profiler' ]
2 info using [email protected]
3 info using [email protected]
4 verbose node symlink C:\Program Files\nodejs\\node.exe
5 verbose read json D:\Projects\Projects\MY_Prjct3\MY_Prjct3\package.json
6 verbose read json D:\Projects\Projects\MY_Prjct3\MY_Prjct3\node_modules\express\package.json
7 verbose read json D:\Projects\Projects\MY_Prjct3\MY_Prjct3\node_modules\hbs\package.json
8 verbose read json D:\Projects\Projects\MY_Prjct3\MY_Prjct3\node_modules\mongodb\package.json
9 verbose read json D:\Projects\Projects\MY_Prjct3\MY_Prjct3\node_modules\mongoose\package.json
10 verbose read json D:\Projects\Projects\MY_Prjct3\MY_Prjct3\node_modules\node-inspector\package.json
11 verbose read json D:\Projects\Projects\MY_Prjct3\MY_Prjct3\package.json
12 verbose cache add [ 'v8-profiler', null ]
13 silly cache add name=undefined spec="v8-profiler" args=["v8-profiler",null]
14 verbose parsed url { pathname: 'v8-profiler',
14 verbose parsed url path: 'v8-profiler',
14 verbose parsed url href: 'v8-profiler' }
15 silly lockFile a12f389f-v8-profiler v8-profiler
16 verbose lock v8-profiler C:\Users\Amol.Kulkarni\AppData\Roaming\npm-cache\a12f389f-v8-profiler.lock
17 silly lockFile a12f389f-v8-profiler v8-profiler
18 verbose addNamed [ 'v8-profiler', '' ]
19 verbose addNamed [ null, '' ]
20 silly lockFile f875d38f-v8-profiler [email protected]
21 verbose lock [email protected] C:\Users\Amol.Kulkarni\AppData\Roaming\npm-cache\f875d38f-v8-profiler.lock
22 silly addNameRange { name: 'v8-profiler', range: '', hasData: false }
23 verbose url raw v8-profiler
24 verbose url resolving [ 'https://registry.npmjs.org/', './v8-profiler' ]
25 verbose url resolved https://registry.npmjs.org/v8-profiler
26 info trying registry request attempt 1 at 16:54:05
27 verbose etag "ET10KXXLUBJGCCEB13YK5N04L"
28 http GET https://registry.npmjs.org/v8-profiler
29 http 304 https://registry.npmjs.org/v8-profiler
30 silly registry.get cb [ 304,
30 silly registry.get { server: 'CouchDB/1.2.0 (Erlang OTP/R15B)',
30 silly registry.get etag: '"ET10KXXLUBJGCCEB13YK5N04L"',
30 silly registry.get date: 'Tue, 08 Jan 2013 11:21:56 GMT',
30 silly registry.get 'content-length': '0' } ]
31 verbose etag v8-profiler from cache
32 silly addNameRange number 2 { name: 'v8-profiler', range: '', hasData: true }
33 silly addNameRange versions [ 'v8-profiler',
33 silly addNameRange [ '0.0.1', '0.0.2', '0.0.3', '3.6.2beta', '3.6.2beta2', '3.6.2-1' ] ]
34 verbose addNamed [ 'v8-profiler', '3.6.2-1' ]
35 verbose addNamed [ '3.6.2-1', '3.6.2-1' ]
36 silly lockFile 19e1a1b9-v8-profiler-3-6-2-1 [email protected]
37 verbose lock [email protected] C:\Users\Amol.Kulkarni\AppData\Roaming\npm-cache\19e1a1b9-v8-profiler-3-6-2-1.lock
38 verbose read json C:\Users\Amol.Kulkarni\AppData\Roaming\npm-cache\v8-profiler\3.6.2-1\package\package.json
39 silly lockFile 19e1a1b9-v8-profiler-3-6-2-1 [email protected]
40 silly lockFile f875d38f-v8-profiler [email protected]
41 silly resolved [ { name: 'v8-profiler',
41 silly resolved version: '3.6.2-1',
41 silly resolved description: 'node bindings for the v8 profiler',
41 silly resolved homepage: 'http://github.com/dannycoates/v8-profiler',
41 silly resolved author: { name: 'Danny Coates', email: '[email protected]' },
41 silly resolved keywords: [ 'profiler', 'inspector' ],
41 silly resolved engines: { node: '>=0.6' },
41 silly resolved main: 'v8-profiler',
41 silly resolved scripts: { install: 'node-gyp rebuild' },
41 silly resolved gypfile: true,
41 silly resolved readme: 'v8-profiler provides [node](http://github.com/ry/node) bindings for the v8 \nprofiler and integration with [node-inspector](http://github.com/dannycoates/node-inspector)\n\n## Installation\n\n npm install v8-profiler\n\n## Usage\n\n var profiler = require(\'v8-profiler\');\n\n## API\n\n var snapshot = profiler.takeSnapshot([name]) //takes a heap snapshot\n\n profiler.startProfiling([name]) //begin cpu profiling\n var cpuProfile = profiler.stopProfiling([name]) //finish cpu profiling\n\n## node-inspector\n\nCpu profiles can be viewed and heap snapshots may be taken and viewed from the\nprofiles panel.\n',
41 silly resolved readmeFilename: 'readme.md',
41 silly resolved _id: '[email protected]',
41 silly resolved _from: 'v8-profiler' } ]
42 info install [email protected] into D:\Projects\Projects\MY_Prjct3\MY_Prjct3
43 info installOne [email protected]
44 verbose from cache C:\Users\Amol.Kulkarni\AppData\Roaming\npm-cache\v8-profiler\3.6.2-1\package\package.json
45 info D:\Projects\Projects\MY_Prjct3\MY_Prjct3\node_modules\v8-profiler unbuild
46 verbose read json D:\Projects\Projects\MY_Prjct3\MY_Prjct3\node_modules\v8-profiler\package.json
47 verbose tar unpack C:\Users\Amol.Kulkarni\AppData\Roaming\npm-cache\v8-profiler\3.6.2-1\package.tgz
48 silly lockFile cffa88b0-ce3-MY_Prjct3-node-modules-v8-profiler D:\Projects\Projects\MY_Prjct3\MY_Prjct3\node_modules\v8-profiler
49 verbose lock D:\Projects\Projects\MY_Prjct3\MY_Prjct3\node_modules\v8-profiler C:\Users\Amol.Kulkarni\AppData\Roaming\npm-cache\cffa88b0-ce3-MY_Prjct3-node-modules-v8-profiler.lock
50 silly gunzTarPerm modes [ '755', '644' ]
51 silly gunzTarPerm extractEntry package.json
52 silly gunzTarPerm modified mode [ 'package.json', 438, 420 ]
53 silly gunzTarPerm extractEntry .npmignore
54 silly gunzTarPerm modified mode [ '.npmignore', 438, 420 ]
55 silly gunzTarPerm extractEntry v8-profiler.js
56 silly gunzTarPerm modified mode [ 'v8-profiler.js', 438, 420 ]
57 silly gunzTarPerm extractEntry profile.cc
58 silly gunzTarPerm modified mode [ 'profile.cc', 438, 420 ]
59 silly gunzTarPerm extractEntry graph_edge.cc
60 silly gunzTarPerm modified mode [ 'graph_edge.cc', 438, 420 ]
61 silly gunzTarPerm extractEntry graph_edge.h
62 silly gunzTarPerm modified mode [ 'graph_edge.h', 438, 420 ]
63 silly gunzTarPerm extractEntry graph_node.cc
64 silly gunzTarPerm modified mode [ 'graph_node.cc', 438, 420 ]
65 silly gunzTarPerm extractEntry graph_node.h
66 silly gunzTarPerm modified mode [ 'graph_node.h', 438, 420 ]
67 silly gunzTarPerm extractEntry heap_profiler.cc
68 silly gunzTarPerm modified mode [ 'heap_profiler.cc', 438, 420 ]
69 silly gunzTarPerm extractEntry heap_profiler.h
70 silly gunzTarPerm modified mode [ 'heap_profiler.h', 438, 420 ]
71 silly gunzTarPerm extractEntry Makefile
72 silly gunzTarPerm modified mode [ 'Makefile', 438, 420 ]
73 silly gunzTarPerm extractEntry binding.gyp
74 silly gunzTarPerm modified mode [ 'binding.gyp', 438, 420 ]
75 silly gunzTarPerm extractEntry cpu_profiler.h
76 silly gunzTarPerm modified mode [ 'cpu_profiler.h', 438, 420 ]
77 silly gunzTarPerm extractEntry profile.h
78 silly gunzTarPerm modified mode [ 'profile.h', 438, 420 ]
79 silly gunzTarPerm extractEntry profiler.cc
80 silly gunzTarPerm modified mode [ 'profiler.cc', 438, 420 ]
81 silly gunzTarPerm extractEntry profile_node.cc
82 silly gunzTarPerm modified mode [ 'profile_node.cc', 438, 420 ]
83 silly gunzTarPerm extractEntry profile_node.h
84 silly gunzTarPerm modified mode [ 'profile_node.h', 438, 420 ]
85 silly gunzTarPerm extractEntry readme.md
86 silly gunzTarPerm modified mode [ 'readme.md', 438, 420 ]
87 silly gunzTarPerm extractEntry snapshot.cc
88 silly gunzTarPerm modified mode [ 'snapshot.cc', 438, 420 ]
89 silly gunzTarPerm extractEntry snapshot.h
90 silly gunzTarPerm modified mode [ 'snapshot.h', 438, 420 ]
91 silly gunzTarPerm extractEntry cpu_profiler.cc
92 silly gunzTarPerm modified mode [ 'cpu_profiler.cc', 438, 420 ]
93 silly gunzTarPerm extractEntry wscript
94 silly gunzTarPerm modified mode [ 'wscript', 438, 420 ]
95 verbose read json D:\Projects\Projects\MY_Prjct3\MY_Prjct3\node_modules\v8-profiler\package.json
96 silly lockFile cffa88b0-ce3-MY_Prjct3-node-modules-v8-profiler D:\Projects\Projects\MY_Prjct3\MY_Prjct3\node_modules\v8-profiler
97 info preinstall [email protected]
98 verbose from cache D:\Projects\Projects\MY_Prjct3\MY_Prjct3\node_modules\v8-profiler\package.json
99 verbose readDependencies using package.json deps
100 verbose from cache D:\Projects\Projects\MY_Prjct3\MY_Prjct3\node_modules\v8-profiler\package.json
101 verbose readDependencies using package.json deps
102 silly resolved []
103 verbose about to build D:\Projects\Projects\MY_Prjct3\MY_Prjct3\node_modules\v8-profiler
104 info build D:\Projects\Projects\MY_Prjct3\MY_Prjct3\node_modules\v8-profiler
105 verbose from cache D:\Projects\Projects\MY_Prjct3\MY_Prjct3\node_modules\v8-profiler\package.json
106 verbose linkStuff [ false,
106 verbose linkStuff false,
106 verbose linkStuff false,
106 verbose linkStuff 'D:\\Projects\\Projects\\MY_Prjct3\\MY_Prjct3\\node_modules' ]
107 info linkStuff [email protected]
108 verbose linkBins [email protected]
109 verbose linkMans [email protected]
110 verbose rebuildBundles [email protected]
111 info install [email protected]
112 verbose unsafe-perm in lifecycle true
113 silly exec cmd "/c" "node-gyp rebuild"
114 silly cmd,/c,node-gyp rebuild,D:\Projects\Projects\MY_Prjct3\MY_Prjct3\node_modules\v8-profiler spawning
115 info [email protected] Failed to exec install script
116 info D:\Projects\Projects\MY_Prjct3\MY_Prjct3\node_modules\v8-profiler unbuild
117 verbose from cache D:\Projects\Projects\MY_Prjct3\MY_Prjct3\node_modules\v8-profiler\package.json
118 info preuninstall [email protected]
119 info uninstall [email protected]
120 verbose true,D:\Projects\Projects\MY_Prjct3\MY_Prjct3\node_modules,D:\Projects\Projects\MY_Prjct3\MY_Prjct3\node_modules unbuild [email protected]
121 info postuninstall [email protected]
122 error [email protected] install: `node-gyp rebuild`
122 error `cmd "/c" "node-gyp rebuild"` failed with 1
123 error Failed at the [email protected] install script.
123 error This is most likely a problem with the v8-profiler package,
123 error not with npm itself.
123 error Tell the author that this fails on your system:
123 error node-gyp rebuild
123 error You can get their info via:
123 error npm owner ls v8-profiler
123 error There is likely additional logging output above.
124 error System Windows_NT 6.1.7601
125 error command "C:\\Program Files\\nodejs\\\\node.exe" "C:\\Program Files\\nodejs\\node_modules\\npm\\bin\\npm-cli.js" "install" "v8-profiler"
126 error cwd D:\Projects\Projects\MY_Prjct3\MY_Prjct3
127 error node -v v0.8.15
128 error npm -v 1.1.66
129 error code ELIFECYCLE
130 verbose exit [ 1, true ]
我明白了這個問題,但我已經在我的系統上安裝64位的微軟的Visual C++速成。仍然收到相同的錯誤...感謝您的時間。 –
@AmolMKulkarni嗯,你還必須確保64位編譯器實際上是調用,而不是32位編譯器。最簡單的方法是卸載32位版本的編譯器,或更正PATH以指向64位版本。 – phihag
改變C++編譯器,NPM,Node.js的32個位之後,該誤差已更改爲: 「graph_node.obj:錯誤LNK2001:解析外部符號」 公共:類V8 ::ħ eapGraphNode常量* __thiscall V8 :: HeapGraphNode: :GetDominatorNode(void)const 「(?GetDominatorNode @ HeapGraphNode @ v8 @@ QBEPBV12 @ XZ)[C:\ Users \ Amol.Kulkarni \ App Data \ Roaming \ npm \ node_modules \ v8-profiler \ build \ profiler.vcxproj ]」 –