kirpt
kirpt

Reputation: 845

Heroku NodeJS deploy

I've tried to deploy my NodeJS project to Heroku. I use free account. When I deployed it I visited the page in the browser and it says: An error occurred in the application and your page could not be served. Please try again in a few moments. I checked the app's logs and it shows that NodeJS cannot find module: Error: Cannot find module 'merge-descriptors'. OK, I installed it and again the same error but the logs showed that another module is missing. When I installed and this module the error was again on the page. I checked all modules in npm list and noticed all of these modules are installed but under express. The most strange is that the app is running perfectly on localhost. The problem occurs only in Heroku. Also I tried to recover an old version of the app but the page again showed error. How I can fix that problem?

Upvotes: 1

Views: 121

Answers (2)

LCD1
LCD1

Reputation: 19

Check if the repo actually has the Node Modules folder, my issue was with .gitignore...

Upvotes: 0

Elisha Kramer
Elisha Kramer

Reputation: 86

 npm install merge-descriptors safer-buffer --save

Then, repush to Heroku.

Upvotes: 1

Related Questions