Polymer / polymer-starter-kit

A starting point for Polymer apps

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

npm run build or polymer build error

AnkitMaheshwariIn opened this issue · comments

FATAL ERROR: CALL_AND_RETRY_LAST Allocation failed - JavaScript heap out of memory

<--- JS stacktrace --->

==== JS stack trace =========================================

Security context: 0x1ea8214a57c1
1: create(this=0x1ea821484739 <JSFunction Object (sfi = 0x1ea801889cf9)>)
2: _setStartLocation [/usr/local/lib/node_modules/polymer-cli/node_modules/parse5/lib/extensions/location_info/parser_mixin.js:30] [bytecode=0x1ea804a5c7f9 offset=30](this=0x1ea8053f61c9 ,element=0x1ea8517886d1 )
3: _attachElementToTree [/usr/local/lib/node_modules/polymer...

FATAL ERROR: CALL_AND_RETRY_LAST Allocation failed - JavaScript heap out of memory
1: node::Abort() [/usr/local/bin/node]
2: node::FatalException(v8::Isolate*, v8::Localv8::Value, v8::Localv8::Message) [/usr/local/bin/node]
3: v8::internal::V8::FatalProcessOutOfMemory(char const*, bool) [/usr/local/bin/node]
4: v8::internal::Factory::NewMap(v8::internal::InstanceType, int, v8::internal::ElementsKind) [/usr/local/bin/node]
5: v8::internal::Map::RawCopy(v8::internal::Handlev8::internal::Map, int) [/usr/local/bin/node]
6: v8::internal::Map::CopyInitialMap(v8::internal::Handlev8::internal::Map, int, int, int) [/usr/local/bin/node]
7: v8::internal::Map::GetObjectCreateMap(v8::internal::Handlev8::internal::HeapObject) [/usr/local/bin/node]
8: v8::internal::Runtime_ObjectCreate(int, v8::internal::Object**, v8::internal::Isolate*) [/usr/local/bin/node]

screen shot 2018-07-25 at 7 21 46 pm

Couldn't reproduce on my machine (Node 10). Can also take a look at this similar issue: Polymer/pwa-starter-kit#292

Here's a solution that worked for me: http://disq.us/p/299niel