Failed to load next.config.mjs

When I run my T3 App, It shows Failed to load next.config.mjs
> next dev

ready - started server on 0.0.0.0:3000, url: http://localhost:3000
info - Loaded env from /home/soodit/Documents/dev/prog/frontend-new/.env
error - Failed to load next.config.mjs, see more info here https://nextjs.org/docs/messages/next-config-error
Error [ERR_MODULE_NOT_FOUND]: Cannot find module '/home/soodit/Documents/dev/prog/frontend-new/src/env/client.mjs' imported from /home/soodit/Documents/dev/prog/frontend-new/src/env/server.mjs
at new NodeError (node:internal/errors:400:5)
at finalizeResolution (node:internal/modules/esm/resolve:326:11)
at moduleResolve (node:internal/modules/esm/resolve:945:10)
at defaultResolve (node:internal/modules/esm/resolve:1153:11)
at nextResolve (node:internal/modules/esm/loader:163:28)
at ESMLoader.resolve (node:internal/modules/esm/loader:842:30)
at ESMLoader.getModuleJob (node:internal/modules/esm/loader:424:18)
at ModuleWrap.<anonymous> (node:internal/modules/esm/module_job:77:40)
at link (node:internal/modules/esm/module_job:76:36) {
code: 'ERR_MODULE_NOT_FOUND'
}
> next dev

ready - started server on 0.0.0.0:3000, url: http://localhost:3000
info - Loaded env from /home/soodit/Documents/dev/prog/frontend-new/.env
error - Failed to load next.config.mjs, see more info here https://nextjs.org/docs/messages/next-config-error
Error [ERR_MODULE_NOT_FOUND]: Cannot find module '/home/soodit/Documents/dev/prog/frontend-new/src/env/client.mjs' imported from /home/soodit/Documents/dev/prog/frontend-new/src/env/server.mjs
at new NodeError (node:internal/errors:400:5)
at finalizeResolution (node:internal/modules/esm/resolve:326:11)
at moduleResolve (node:internal/modules/esm/resolve:945:10)
at defaultResolve (node:internal/modules/esm/resolve:1153:11)
at nextResolve (node:internal/modules/esm/loader:163:28)
at ESMLoader.resolve (node:internal/modules/esm/loader:842:30)
at ESMLoader.getModuleJob (node:internal/modules/esm/loader:424:18)
at ModuleWrap.<anonymous> (node:internal/modules/esm/module_job:77:40)
at link (node:internal/modules/esm/module_job:76:36) {
code: 'ERR_MODULE_NOT_FOUND'
}
1 Reply
BabaYaga
BabaYagaOP2y ago
I tried deleting my node_modules and Reinstalling Node, But it is still giving me the same error
Want results from more Discord servers?
Add your server