- 进入到engine目录
- npm install -g gulp
- npm install
- npm build.
在执行了第四步的时候,出现以下输出:
$ gulp build
[17:58:44] Using gulpfile D:\cocos\CocosCreator_2.1.2\resources\engine\gulpfile.js
[17:58:44] Starting ‘clean-cache’…
[17:58:44] Starting ‘build-debug-infos’…
[17:58:44] Finished ‘build-debug-infos’ after 11 ms
[17:58:44] Starting ‘build-html5-preview’…
[17:58:45] Starting ‘build-jsb-preview’…
[17:58:45] Finished ‘clean-cache’ after 460 ms
[17:58:45] Starting ‘build-jsb-dev’…
[17:58:45] Starting ‘build-jsb-min’…
(node:18876) [DEP0005] DeprecationWarning: Buffer() is deprecated due to security and usability issues. Please use the Buffer.alloc(), Buffer.allocUnsafe(), or Buffer.from() methods instead.
FATAL ERROR: Ineffective mark-compacts near heap limit Allocation failed - JavaScript heap out of memory
1: 00007FF7E1C3F04A v8::internal::GCIdleTimeHandler::GCIdleTimeHandler+5114
2: 00007FF7E1C1A0C6 node::MakeCallback+4518
3: 00007FF7E1C1AA30 node_module_register+2032
4: 00007FF7E1EA20EE v8::internal::FatalProcessOutOfMemory+846
5: 00007FF7E1EA201F v8::internal::FatalProcessOutOfMemory+639
6: 00007FF7E23C2BC4 v8::internal::Heap::MaxHeapGrowingFactor+9556
7: 00007FF7E23B9C46 v8::internal::ScavengeJob::operator=+24310
8: 00007FF7E23B829C v8::internal::ScavengeJob::operator=+17740
9: 00007FF7E23C0F87 v8::internal::Heap::MaxHeapGrowingFactor+2327
10: 00007FF7E23C1006 v8::internal::Heap::MaxHeapGrowingFactor+2454
11: 00007FF7E1F7CDB7 v8::internal:
:NewFillerObject+55
12: 00007FF7E2012CC6 v8::internal::WasmJs::Install+29414
13: 000002D72285C5C1
定制编译失败。请问这个问题怎么解决?