Deployment Issue from Express/MongoDB app

I’ve got a simple Express/MongoDB app I’m trying to deploy, but whenever I try to deploy, it builds successfully and then fails with ‘Error: Cannot find module ‘…/Config/connection’’ in my index.js file. But from that file, ‘…/Config/connection’ is the correct file path. Not sure what the issue is.

Any thoughts?


Please add file extension to the import and try then:

Same issue, unfortunately!


I’ve replied to the ticket you also opened, but for completeness I’ll add the same repsonse here:

This is likely a file-casing issue. Linux filesystems are case-senstive, so if your seeing …/Config/connection but the connection.js file is actually named Connection.js (capital C), it wouldn’t be found. You’ll need to check the paths and casing matches exactly between your code and the filesystem.

Hope that helps


This topic was automatically closed 30 days after the last reply. New replies are no longer allowed.