"module not found" while using static path
mohan1203
TRIALOP

2 years ago

I am deploying nodejs project on railway I got error that Error: Cannot find module '../models/userModel'

Jun 26 12:24:02

Require stack:

Jun 26 12:24:02

- /app/src/middleware/authMiddleware.js

Jun 26 12:24:02

- /app/index.jsWhile this same import statement working fine locally but and it build successfully but when it deploy than it give this error I don't understand why this is happening.Is there common module import type is reason behind this error?

1 Replies

2 years ago

Please make sure your folder and filename casing is the same on GitHub as it is locally.


Loading...