작성
·
6
0
연결이 안되네요. 오류 메세지를 올릴게요.
MongooseError: The uri
parameter to openUri()
must be a string, got "undefined". Make sure the first parameter to mongoose.connect()
or mongoose.createConnection()
is a string.
at NativeConnection.createClient (D:\inflearn\boiler-plate\node_modules\mongoose\lib\drivers\node-mongodb-native\connection.js:225:11)
at NativeConnection.openUri (D:\inflearn\boiler-plate\node_modules\mongoose\lib\connection.js:835:34)
at connect (D:\inflearn\boiler-plate\node_modules\mongoose\lib\mongoose.js:447:15)
at file:///D:/inflearn/boiler-plate/index.js:19:1
at ModuleJob.run (node:internal/modules/esm/module_job:268:25)
at async onImport.tracePromise.__proto__ (node:internal/modules/esm/loader:543:26)
at async asyncRunEntryPointWithESMLoader (node:internal/modules/run_main:116:5)Example app listening on port 5000
node:internal/modules/esm/resolve:257
throw new ERR_MODULE_NOT_FOUND(
^
Error [ERR_MODULE_NOT_FOUND]: Cannot find module 'D:\inflearn\boiler-plate\config\dev' imported from D:\inflearn\boiler-plate\config\key.js
at finalizeResolution (node:internal/modules/esm/resolve:257:11)
at moduleResolve (node:internal/modules/esm/resolve:913:10)
at defaultResolve (node:internal/modules/esm/resolve:1037:11)
at ModuleLoader.defaultResolve (node:internal/modules/esm/loader:650:12)
at #cachedDefaultResolve (node:internal/modules/esm/loader:599:25)
at ModuleLoader.resolve (node:internal/modules/esm/loader:582:38)
at ModuleLoader.getModuleJobForImport (node:internal/modules/esm/loader:241:38) at onImport.tracePromise.__proto__ (node:internal/modules/esm/loader:542:36)
at TracingChannel.tracePromise (node:diagnostics_channel:337:14)
at ModuleLoader.import (node:internal/modules/esm/loader:541:21) {
code: 'ERR_MODULE_NOT_FOUND',
url: 'file:///D:/inflearn/boiler-plate/config/dev'
}
Node.js v22.11.0
at moduleResolve (node:internal/modules/esm/resolve:913:10)
at defaultResolve (node:internal/modules/esm/resolve:1037:11)
at ModuleLoader.defaultResolve (node:internal/modules/esm/loader:650:12)
at #cachedDefaultResolve (node:internal/modules/esm/loader:599:25)
at ModuleLoader.resolve (node:internal/modules/esm/loader:582:38)
at ModuleLoader.getModuleJobForImport (node:internal/modules/esm/loader:241:38) at onImport.tracePromise.__proto__ (node:internal/modules/esm/loader:542:36)
at TracingChannel.tracePromise (node:diagnostics_channel:337:14)
at ModuleLoader.import (node:internal/modules/esm/loader:541:21) {
code: 'ERR_MODULE_NOT_FOUND',
url: 'file:///D:/inflearn/boiler-plate/config/dev'
}
Node.js v22.11.0
code: 'ERR_MODULE_NOT_FOUND',
url: 'file:///D:/inflearn/boiler-plate/config/dev'
}
답변