-
Notifications
You must be signed in to change notification settings - Fork 291
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
node:internal/modules/cjs/loader:1247 throw err; ^ #4538
Comments
while move producntion showing this error |
you might have a sort of plugin that auto adds .js or json extension thats what happened to me from this error:
this is the code file that i got the error from:
what i did is change the last 3 lines like this
from that i didnt get the error. |
Node.js Version
v22.13.1
NPM Version
v10.9.2
Operating System
ubuntu
Subsystem
console
Description
show this error vps hosting mern stack app
Minimal Reproduction
Error: Cannot find module '../Models/QuoteModel'
Require stack:
at Function._resolveFilename (node:internal/modules/cjs/loader:1244:15)
at Function._load (node:internal/modules/cjs/loader:1070:27)
at TracingChannel.traceSync (node:diagnostics_channel:322:14)
at wrapModuleLoad (node:internal/modules/cjs/loader:217:24)
at Module.require (node:internal/modules/cjs/loader:1335:12)
at require (node:internal/modules/helpers:136:16)
at Object. (/var/www/Travelers-Need/backend/Controller/quoteController.js:1:15)
at Module._compile (node:internal/modules/cjs/loader:1562:14)
at Object..js (node:internal/modules/cjs/loader:1699:10)
at Module.load (node:internal/modules/cjs/loader:1313:32) {
code: 'MODULE_NOT_FOUND',
requireStack: [
'/var/www/Travelers-Need/backend/Controller/quoteController.js',
'/var/www/Travelers-Need/backend/Routes/quoteRoutes.js',
'/var/www/Travelers-Need/backend/index.js'
]
}
Node.js v22.13.1
Output
No response
Before You Submit
The text was updated successfully, but these errors were encountered: