balderdashy / sails

Realtime MVC Framework for Node.js
https://sailsjs.com
MIT License
22.82k stars 1.95k forks source link

Issue with deploying to heroku #2382

Closed mason-lee closed 8 years ago

mason-lee commented 9 years ago

Hi there, I am trying deploy sails app to Heroku but I've been keep getting the errors below. Can someone please help me with this issue?

2014-11-08T09:22:24.367768+00:00 app[web.1]: 2014-11-08T09:22:24.371352+00:00 app[web.1]: sudo chown -R 42242 /app/.tmp 2014-11-08T09:22:24.371388+00:00 app[web.1]: 2014-11-08T09:23:21.664081+00:00 heroku[web.1]: Process exited with status 137 2014-11-08T10:08:38.055444+00:00 heroku[web.1]: Process exited with status 137 2014-11-08T10:07:39.149726+00:00 app[web.1]: \ Grunt :: An error occurred. 2014-11-08T10:07:39.149966+00:00 app[web.1]: 2014-11-08T10:07:39.149971+00:00 app[web.1]: ------------------------------------------------------------------------ 2014-11-08T10:07:39.149974+00:00 app[web.1]: Aborted due to warnings. 2014-11-08T10:07:39.149976+00:00 app[web.1]: Running "sass:dev" (sass) task 2014-11-08T10:07:39.149978+00:00 app[web.1]: Warning: 2014-11-08T10:07:39.149980+00:00 app[web.1]: You need to have Ruby and Sass installed and in your PATH for this task to work. 2014-11-08T10:07:39.149982+00:00 app[web.1]: More info: https://github.com/gruntjs/grunt-contrib-sass 2014-11-08T10:07:39.149984+00:00 app[web.1]:
2014-11-08T10:07:39.149987+00:00 app[web.1]: ------------------------------------------------------------------------ 2014-11-08T10:07:39.150027+00:00 app[web.1]: 2014-11-08T10:07:39.150071+00:00 app[web.1]: Looks like a Grunt error occurred-- 2014-11-08T10:07:39.150103+00:00 app[web.1]: Please fix it, then
restart Sails to continue running tasks (e.g. watching for changes in assets) 2014-11-08T10:07:39.150131+00:00 app[web.1]: Or if you're stuck, check out the troubleshooting tips below. 2014-11-08T10:07:39.150198+00:00 app[web.1]: 2014-11-08T10:07:39.150614+00:00 app[web.1]: Troubleshooting tips: 2014-11-08T10:07:39.150680+00:00 app[web.1]: 2014-11-08T10:07:39.150715+00:00 app[web.1]: _-> Are "grunt" and related grunt task modules installed locally? Run npm install if you're not sure. 2014-11-08T10:07:39.150742+00:00 app[web.1]: 2014-11-08T10:07:39.150777+00:00 app[web.1]: -> You might have a malformed LESS, SASS, CoffeeScript file, etc. 2014-11-08T10:07:39.150809+00:00 app[web.1]: 2014-11-08T10:07:39.150847+00:00 app[web.1]: -> Or maybe you don't have permissions to access the .tmp directory? 2014-11-08T10:07:39.150889+00:00 app[web.1]: e.g., /app/.tmp ? 2014-11-08T10:07:39.150922+00:00 app[web.1]: 2014-11-08T10:07:39.150960+00:00 app[web.1]: If you think this might be the case, try running: 2014-11-08T10:07:39.150995+00:00 app[web.1]: sudo chown -R 52966 /app/.tmp 2014-11-08T10:07:39.151032+00:00 app[web.1]: 2014-11-08T10:07:36.929450+00:00 heroku[web.1]: Starting process with command node app.js 2014-11-08T10:08:38.066574+00:00 heroku[web.1]: State changed from starting to crashed 2014-11-08T11:48:35.762597+00:00 heroku[web.1]: State changed from crashed to starting 2014-11-08T11:48:39.522814+00:00 heroku[web.1]: Starting process with command node app.js 2014-11-08T11:48:41.867962+00:00 app[web.1]: You need to have Ruby and Sass installed and in your PATH for this task to work. 2014-11-08T11:48:41.868205+00:00 app[web.1]: 2014-11-08T11:48:41.867956+00:00 app[web.1]: ------------------------------------------------------------------------ 2014-11-08T11:48:41.868054+00:00 app[web.1]: 2014-11-08T11:48:41.868813+00:00 app[web.1]: 2014-11-08T11:48:41.869050+00:00 app[web.1]: sudo chown -R 57171 /app/.tmp 2014-11-08T11:48:41.867959+00:00 app[web.1]: Running "sass:dev" (sass) task 2014-11-08T11:48:41.868148+00:00 app[web.1]: Please fix it, then _restart Sails* to continue running tasks (e.g. watching for changes in assets) 2014-11-08T11:48:41.868886+00:00 app[web.1]: 2014-11-08T11:48:41.867961+00:00 app[web.1]: Warning: 2014-11-08T11:48:41.868153+00:00 app[web.1]: Or if you're stuck, check out the troubleshooting tips below. 2014-11-08T11:48:41.868914+00:00 app[web.1]: -> Or maybe you don't have permissions to access the .tmp directory? 2014-11-08T11:48:41.867953+00:00 app[web.1]: 2014-11-08T11:48:41.867967+00:00 app[web.1]: ------------------------------------------------------------------------ 2014-11-08T11:48:41.868784+00:00 app[web.1]: -> Are "grunt" and related grunt task modules installed locally? Run npm install if you're not sure. 2014-11-08T11:48:41.869013+00:00 app[web.1]: If you think this might be the case, try running: 2014-11-08T11:48:41.867957+00:00 app[web.1]: Aborted due to warnings. 2014-11-08T11:48:41.868100+00:00 app[web.1]: Looks like a Grunt error occurred-- 2014-11-08T11:48:41.868843+00:00 app[web.1]: -> You might have a malformed LESS, SASS, CoffeeScript file, etc. 2014-11-08T11:48:41.869084+00:00 app[web.1]: 2014-11-08T11:48:41.867661+00:00 app[web.1]: * Grunt :: An error occurred. 2014-11-08T11:48:41.867965+00:00 app[web.1]:
2014-11-08T11:48:41.868754+00:00 app[web.1]: 2014-11-08T11:48:41.868984+00:00 app[web.1]: 2014-11-08T11:48:41.867964+00:00 app[web.1]: More info: https://github.com/gruntjs/grunt-contrib-sass 2014-11-08T11:48:41.868652+00:00 app[web.1]: Troubleshooting tips: 2014-11-08T11:48:41.868952+00:00 app[web.1]: e.g., /app/.tmp ? 2014-11-08T11:49:39.808380+00:00 heroku[web.1]: Stopping process with SIGKILL 2014-11-08T11:49:40.496355+00:00 heroku[web.1]: State changed from starting to crashed 2014-11-08T11:49:39.808154+00:00 heroku[web.1]: Error R10 (Boot timeout) -> Web process failed to bind to $PORT within 60 seconds of launch 2014-11-08T11:49:40.486487+00:00 heroku[web.1]: Process exited with status 137 2014-11-08T14:44:26.994135+00:00 heroku[web.1]: State changed from starting to crashed 2014-11-08T14:43:23.092618+00:00 heroku[web.1]: State changed from crashed to starting 2014-11-08T14:43:26.007043+00:00 heroku[web.1]: Starting process with command node app.js 2014-11-08T14:43:28.266704+00:00 app[web.1]: 2014-11-08T14:43:28.266709+00:00 app[web.1]: ------------------------------------------------------------------------ 2014-11-08T14:43:28.266710+00:00 app[web.1]: Aborted due to warnings. 2014-11-08T14:43:28.266713+00:00 app[web.1]: Running "sass:dev" (sass) task 2014-11-08T14:43:28.266715+00:00 app[web.1]: Warning: 2014-11-08T14:43:28.266716+00:00 app[web.1]: You need to have Ruby and Sass installed and in your PATH for this task to work. 2014-11-08T14:43:28.266718+00:00 app[web.1]: More info: https://github.com/gruntjs/grunt-contrib-sass 2014-11-08T14:43:28.266719+00:00 app[web.1]:
2014-11-08T14:43:28.266721+00:00 app[web.1]: ------------------------------------------------------------------------ 2014-11-08T14:43:28.266722+00:00 app[web.1]: 2014-11-08T14:43:28.266729+00:00 app[web.1]: Looks like a Grunt error occurred-- 2014-11-08T14:43:28.266731+00:00 app[web.1]: Please fix it, then restart Sails to continue running tasks (e.g. watching for changes in assets) 2014-11-08T14:43:28.266732+00:00 app[web.1]: Or if you're stuck, check out the troubleshooting tips below. 2014-11-08T14:43:28.266733+00:00 app[web.1]: 2014-11-08T14:43:28.266735+00:00 app[web.1]: Troubleshooting tips: 2014-11-08T14:43:28.266736+00:00 app[web.1]: 2014-11-08T14:43:28.266738+00:00 app[web.1]: -> Are "grunt" and related grunt task modules installed locally? Run npm install if you're not sure. 2014-11-08T14:43:28.266739+00:00 app[web.1]: 2014-11-08T14:43:28.266740+00:00 app[web.1]: -> You might have a malformed LESS, SASS, CoffeeScript file, etc. 2014-11-08T14:43:28.266742+00:00 app[web.1]: 2014-11-08T14:43:28.266743+00:00 app[web.1]: *-> Or maybe you don't have permissions to access the .tmp directory? 2014-11-08T14:43:28.266745+00:00 app[web.1]: e.g., /app/.tmp ? 2014-11-08T14:43:28.266746+00:00 app[web.1]: 2014-11-08T14:43:28.266748+00:00 app[web.1]: If you think this might be the case, try running: 2014-11-08T14:43:28.266749+00:00 app[web.1]: sudo chown -R 5310 /app/.tmp 2014-11-08T14:43:28.266750+00:00 app[web.1]: 2014-11-08T14:44:26.982128+00:00 heroku[web.1]: Process exited with status 137 2014-11-08T14:44:26.080319+00:00 heroku[web.1]: Error R10 (Boot timeout) -> Web process failed to bind to $PORT within 60 seconds of launch 2014-11-08T14:44:26.080319+00:00 heroku[web.1]: Stopping process with SIGKILL 2014-11-09T04:20:57.677604+00:00 heroku[router]: at=error code=H10 desc="App crashed" method=GET path="/" host=fcat-conference.herokuapp.com request_id=cfb1d2f5-5725-4c30-9fb8-05d9069c14b8 fwd="207.23.219.110" dyno= connect= service= status=503 bytes= 2014-11-09T04:20:58.010269+00:00 heroku[router]: at=error code=H10 desc="App crashed" method=GET path="/favicon.ico" host=fcat-conference.herokuapp.com request_id=fa848446-3819-47ae-8657-af618436bc4a fwd="207.23.219.110" dyno= connect= service= status=503 bytes=

arcseldon commented 9 years ago

@mason-lee This is not an answer. However, straight off the bat, I just wished to give you some kind of reassurance in case this is your first ever attempt to get Sails running on Heroku. I have successfully done this many times using Sails 0.10.5 on Heroku. Certainly your issue looks related to Grunt and your project specific assets pipeline. Could you try just generating a vanilla Sails app, dropping a procfile in the base, and deploying to Heroku without making any other changes? The success or failure of doing that might help confirm this or otherwise. The apps I have deployed to date, are Server side only, ie. REST apps, with separate MEAN app fronting it. Best of luck.

mason-lee commented 9 years ago

Thanks for your reply. I've deployed Sails projects to Heroku several times but it is my first time using Sass with Sails. I've followed https://github.com/sails101/using-sass, but I can't seem to figure out what is wrong..Thanks though.

arcseldon commented 9 years ago

@mason-lee ok, thanks for the clarification. That context info is helpful. Haven't used SASS in conjunction with a Sails deployment to Heroku. Have you tried using a Buildpack ? For instance, this build pack fork has grunt support and might help. Otherwise, in addition to posting here, you might get some assistance on SOF. Best of luck.

nickautomatic commented 9 years ago

Did anyone get anywhere with this? I'm having what looks like the same problem. I've tried the buildpack and I'm still getting errors when I push to Heroku. In particular, I'm getting the following message in my logs:

Grunt :: Warning: spawn ENOENT Use --force to continue

The problem seems to be caused by grunt-contrib-sass, because if I remove that task, my app works ok again. I'd be very grateful for any help, because I'm stumped as to how to get this to work.

alarner commented 9 years ago

I'm running into the same issue. Would appreciate any tips

scriptology commented 9 years ago

Would appreciate any tips

alarner commented 9 years ago

I was able to get sails working on Heroku and I put together an example template of how it works. Unfortunately I had to strip out all of the grunt processing, minificacation, etc. It's not ideal, but it's better than nothing.

nickautomatic commented 9 years ago

I've finally managed to get Sails working with Sass on Heroku! After going through the logs, I realised the issue is with not having Ruby and the Sass gem installed with a default Node.js app. I wrote up the process to get those installed and grunt-contrib-sass working in this answer over on Stack Overflow.

sailsbot commented 8 years ago

Thanks for posting, @mason-lee. I'm a repo bot-- nice to meet you!

It has been 60 days since there have been any updates or new comments on this page. If this issue has been resolved, feel free to disregard the rest of this message. On the other hand, if you are still waiting on a patch, please:

Thanks so much for your help!

danielmarcoto commented 8 years ago

I got the same issue, then I changed the dependence package for sass/scss transformations from grunt-contrib-sass to grunt-sass. The only update in the code was on config/task/sass.js (grunt.loadNpmTasks('grunt-sass'). I hope it to be useful for some dev.

jonchenn commented 7 years ago

Thanks danielmarcoto@, I got exact the same issue, and the problem was solved after changing from grunt-contrib-sass to grunt-sass.