I\'m running Laravel 5.4 on my Homestead vagrant box. I\'ve installed all the npm dependencies with npm install command. That didn\'t produce a
I had faced the same problem with one of my test script in NodeJS and i resolved my error by using ECMAScript 5's strict mode.
"use strict";
Added above line at the top of my script and it works well.
Strict mode makes several changes to normal JavaScript semantics:
Eliminates some JavaScript silent errors by changing them to throw errors.
Fixes mistakes that make it difficult for JavaScript engines to perform optimizations: strict mode code can sometimes be made to run faster than identical code that's not strict mode.
Prohibits some syntax likely to be defined in future versions of ECMAScript.