module not found issue

24 views
Skip to first unread message

Salomon Thomas

unread,
Mar 20, 2020, 4:46:34 AM3/20/20
to nodejs
Hi,
 I just hosted my nodejs app on aws and got this weird error, 
I rechecked the files multiple times the file is actually on this path.

internal/modules/cjs/loader.js:985
  throw err;
  ^

Error: Cannot find module '../models/productModel'
Require stack:
- /var/server/controllers/productController.js
- /var/server/routes/productRouter.js
- /var/server/app.js
- /var/server/server.js

really am stuck with this......

John Shaver

unread,
Mar 22, 2020, 3:57:58 PM3/22/20
to nod...@googlegroups.com
For some reason, it seems that your
/var/server/models/productModel.(mjs|js|json) file is not being found
by your application. Make sure that it is in place on the server, and
that it is spelled (and capitalized) correctly.

-John
> --
> Job board: http://jobs.nodejs.org/
> New group rules: https://gist.github.com/othiym23/9886289#file-moderation-policy-md
> Old group rules: https://github.com/joyent/node/wiki/Mailing-List-Posting-Guidelines
> ---
> You received this message because you are subscribed to the Google Groups "nodejs" group.
> To unsubscribe from this group and stop receiving emails from it, send an email to nodejs+un...@googlegroups.com.
> To view this discussion on the web visit https://groups.google.com/d/msgid/nodejs/d9225251-a003-4938-9fb2-76394f82f5eb%40googlegroups.com.
Reply all
Reply to author
Forward
0 new messages