I am trying to deploy my node.js application on render.com then i am getting this error i have tried everthing to resolve this like deleting node_modules then reinstall the clearing cache please help me out to resolve this

node:internal/modules/cjs/loader:1147

Mar 26 12:34:51 PMERROR throw err;

Mar 26 12:34:51 PMINFO ^

Mar 26 12:34:51 PMINFO

Mar 26 12:34:51 PMERRORError: Cannot find module ‘./connectionState’

Mar 26 12:34:51 PMINFORequire stack:

Mar 26 12:34:51 PMINFO- /opt/render/project/src/node_modules/mongoose/lib/collection.js

Mar 26 12:34:51 PMINFO- /opt/render/project/src/node_modules/mongoose/lib/drivers/node-mongodb-native/collection.js

Mar 26 12:34:51 PMINFO- /opt/render/project/src/node_modules/mongoose/lib/drivers/node-mongodb-native/index.js

Mar 26 12:34:51 PMINFO- /opt/render/project/src/node_modules/mongoose/lib/index.js

Mar 26 12:34:51 PMINFO- /opt/render/project/src/node_modules/mongoose/index.js

Mar 26 12:34:51 PMINFO- /opt/render/project/src/Models/database.js

Mar 26 12:34:51 PMINFO- /opt/render/project/src/app.js

Mar 26 12:34:51 PMINFO at Module._resolveFilename (node:internal/modules/cjs/loader:1144:15)

Mar 26 12:34:51 PMINFO at Module._load (node:internal/modules/cjs/loader:985:27)

Mar 26 12:34:51 PMINFO at Module.require (node:internal/modules/cjs/loader:1235:19)

Mar 26 12:34:51 PMINFO at require (node:internal/modules/helpers:176:18)

Mar 26 12:34:51 PMINFO at Object. (/opt/render/project/src/node_modules/mongoose/lib/collection.js:8:16)

Mar 26 12:34:51 PMINFO at Module._compile (node:internal/modules/cjs/loader:1376:14)

Mar 26 12:34:51 PMINFO at Module._extensions…js (node:internal/modules/cjs/loader:1435:10)

Mar 26 12:34:51 PMINFO at Module.load (node:internal/modules/cjs/loader:1207:32)

Mar 26 12:34:51 PMINFO at Module._load (node:internal/modules/cjs/loader:1023:12)

Mar 26 12:34:51 PMINFO at Module.require (node:internal/modules/cjs/loader:1235:19) {

Mar 26 12:34:51 PMINFO code: ‘MODULE_NOT_FOUND’,

Mar 26 12:34:51 PMINFO requireStack: [

Mar 26 12:34:51 PMINFO ‘/opt/render/project/src/node_modules/mongoose/lib/collection.js’,

Mar 26 12:34:51 PMINFO ‘/opt/render/project/src/node_modules/mongoose/lib/drivers/node-mongodb-native/collection.js’,

Mar 26 12:34:51 PMINFO ‘/opt/render/project/src/node_modules/mongoose/lib/drivers/node-mongodb-native/index.js’,

Mar 26 12:34:51 PMINFO ‘/opt/render/project/src/node_modules/mongoose/lib/index.js’,

Mar 26 12:34:51 PMINFO ‘/opt/render/project/src/node_modules/mongoose/index.js’,

Mar 26 12:34:52 PMINFO ‘/opt/render/project/src/Models/database.js’,

Mar 26 12:34:52 PMINFO ‘/opt/render/project/src/app.js’

Mar 26 12:34:52 PMINFO ]

Mar 26 12:34:52 PMINFO}

Mar 26 12:34:52 PMINFO

Mar 26 12:34:52 PMINFONode.js v20.11.1

Hey,

Is ‘connectionState’ a file or folder that exists from the root path of your repo? With the same casing?

Jérémy.
Render Support, UTC+3

no there is nothing like connectionState in my repo

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