Maybe there is a JS syntax error near name (newElement) in your app.js.
Dec 19, 2016
9
Level 4
gulp --production failing
I'm using Webpack to "compile" a bunch of Vue components, inside of a Laravel 5.3 project.
gulp is working fine but gulp --production throws an error :
{ Error
at new JS_Parse_Error (eval at <anonymous> (/var/www/node_modules/gulp-uglify/node_modules/uglify-js/tools/node.js:28:1), <anonymous>:1534:18)
[...snip...]
message: '/var/www/app.js: SyntaxError: Unexpected token: name (newElement)',
fileName: '/var/www/app.js',
lineNumber: 115184,
[...snip...]
I tried to update node, npm and my packages. I deleted node_modules and ran npm i again.
My main problem is that the file state (/var/www/app.js) doesn't even exists, and my /public/js/app.js file doesn't have 115184 lines.
My app.js file is getting bigger every day (almost 9Mo ATM) and I really need to uglify it...
Here is my gulpfile.js :
elixir(mix => {
mix.sass('app.scss')
.webpack('app.js', 'public/js')
.version([
'css/app.css',
'js/app.js'
], 'public');
Any hints on how to debug this issue would be VERY appreciated. Thank you !
Please or to participate in this conversation.