JS build error - "gulp" work, "gulp --production" fail

Hey guys,

i have a little problem building my main.js.
I actually added dependencies to the manifest.json from /assets/ folder.
Actually, i dont add my 4 JS dependencies to the main.js file, but to another JS file “dep.js” wich i include from the assets() function (enqueue scripts).

The “gulp” command is succesfull. Create my main.js, main.css and dep.js in dist folder with .map files.

But the “gulp --production” fail with:

[16:56:45] 'jshint' errored after 300 ms [16:56:45] Error in plugin 'gulp-jshint' Message: JSHint failed for: assets\scripts\page-loader\mode rnizr.custom.js, assets\scripts\page-loader\pathLoader .js, assets\scripts\page-loader\main.js [16:56:45] 'build' errored after 1.87 s [16:56:45] Error in plugin 'run-sequence' Message: An error occured in task 'jshint'.

Any idea why one work, and not the other ?

thx !

Hey guys.

Maybe is there a way to get some clearer informations about JShint errors ? “gulp --production” tell me wich files are concerned, but not the exact error so I cannot try a fix…

Thanks :smiley:

Same problem for me, did you find a solution for this?
any suggestion?

Not the best solution, but was able to build to production successfully after adding this as the first line of my main.js file:

/* jshint ignore:start */