I\'v made a static single page site using grunt. I\'m now trying to deploy it to heroku using the heroku-buildpack-nodejs-grunt for node grunt.
Below is a pic of my roo
The only thing I can think of is that maybe Heroku installs your devDependencies
first, tries to run Grunt, but since it didn't install load-grunt-tasks
yet, you don't get the grunt.loadNpmTasks( 'grunt-contrib-uglify' );
line (which load-grunt-tasks
does for you), and thus Grunt can't find the package.
Can you try changing your Gruntfile
to explicitly list out all npm modules using the grunt.loadNpmTasks()
method?
EDIT:
Just remembered another thing I had to do:
heroku labs:enable user-env-compile -a myapp
heroku config:set NODE_ENV=production
(Obviously replacing myapp
with your Heroku app name.)
This makes Heroku allow user set environment variables and then sets your server to production
. Try that, and set your dependencies
and devDependencies
as you had them originally (just to see if it works).