Created
June 19, 2015 13:37
-
-
Save bitflower/fe22c7acd99eb2336ff7 to your computer and use it in GitHub Desktop.
Heroku setup
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
(Source: http://stackoverflow.com/questions/18466943/how-can-i-get-rid-of-error-cannot-find-module-models-on-heroku) | |
You need to set NODE_PATH=lib to heroku's configuration variables. | |
NODE_PATH tells node where to find modules besides node_modules directory. | |
Also, you need to tell the app to read env variables in a production environment. | |
So... | |
$ heroku config:set NODE_ENV=production | |
$ heroku config:set NODE_PATH=lib | |
There is no need to modify any file for a heroku deployment. |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment