Application throws error after deploy on vm Application throws error after deploy on vm linux linux

Application throws error after deploy on vm


I don't believe Object static methods are available in Node 6.x (well, not without a flag)According to the Node website they are available in 7.x onwards.

See this page for details of the minimum version you need

As mentioned by ForestG, your best solution is to update your VM to Node 7.x or later.


It looks like either minification issue due to missing ; or aggressive optimization or file is corrupted, but difficult to reason without source code.

Example:

//without minification works okfunction test() {      var postTypes = new Array('hello', 'there')         (function() { alert('hello there') })()}//after minification produces error Uncaught TypeError: object is not a functionfunction test() {      var postTypes = new Array('hello', 'there')(function() { alert('hello there') })()}