I am trying to put my application into production using Sails.js, but I can not get past the grunt tasks. This is the error I get:
error: Error: The hook `grunt` is taking too long to load. Make sure it is triggering its `initialize()` callback, or else set `sails.config.grunt._hookTimeout to a higher value (currently 20000) at tooLong [as _onTimeout] (/usr/local/lib/node_modules/sails/lib/app/private/loadHooks.js:92:21) at Timer.listOnTimeout (timers.js:110:15)
I drastically increased sails.config.grunt._hookTimeout and the process is still not complete. Running sails debug in product or development output:
Grunt :: Error: listen EADDRINUSE at exports._errnoException (util.js:746:11) at Agent.Server._listen2 (net.js:1156:14) at listen (net.js:1182:10) at Agent.Server.listen (net.js:1267:5) at Object.start (_debugger_agent.js:20:9) at startup (node.js:86:9) at node.js:814:3
It is very strange to me that in development mode everything works fine, but not in production. The attached files are quite large, for example angular, moment and other modules. This is what jsFilesToInject looks jsFilesToInject :
var jsFilesToInject = [ // Load sails.io before everything else 'js/dependencies/sails.io.js', 'js/dependencies/angular.min.js', 'js/dependencies/moment.min.js', 'js/dependencies/angular-ui-router.min.js', 'js/dependencies/angular-sails.min.js', 'js/dependencies/angular-moment.min.js', 'js/dependencies/angular-animate.min.js', 'js/dependencies/angular-aria.min.js', 'js/dependencies/angular-material.min.js', // All of the rest of your client-side js files // will be injected here in no particular order. 'js/**/*.js' ];
I'm not sure what else could cause this, any suggestions? I am using Sails version 0.11.0
source share