Skip to content
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

MongooseError: The uri parameter to openUri() must be a string #1

Open
Alxzu opened this issue Mar 25, 2019 · 0 comments
Open

MongooseError: The uri parameter to openUri() must be a string #1

Alxzu opened this issue Mar 25, 2019 · 0 comments

Comments

@Alxzu
Copy link

Alxzu commented Mar 25, 2019

Got this after a fresh clone & run (sh run.sh). I had to modify the docker-compose.yml:17 to COPY .env ./ in order to make it "work" as shown below

nest_1   | [Nest] 116   -
nest_1   | 3/25/2019, 6:42:10 PM
nest_1   | [NestFactory] Starting Nest application...
nest_1   | [Nest] 116   - 3/25/2019, 6:42:10 PM
nest_1   | [InstanceLoader] ApplicationModule dependencies initialized +13ms
nest_1   | [Nest] 116   - 3/25/2019, 6:42:10 PM   [InstanceLoader] TypegooseModule dependencies initialized +0ms
nest_1   | [Nest] 116   -
nest_1   | 3/25/2019, 6:42:10 PM   [ExceptionHandler] 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. +2ms
nest_1   | 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.
nest_1   |     at new MongooseError (/api/node_modules/mongoose/lib/error/mongooseError.js:14:11)
nest_1   |     at NativeConnection.Connection.openUri (/api/node_modules/mongoose/lib/connection.js:428:11)
nest_1   |     at Mongoose.createConnection (/api/node_modules/mongoose/lib/index.js:226:17)
nest_1   |     at Object.useFactory [as metatype] (/api/node_modules/nestjs-typegoose/dist/typegoose-core.module.js:32:40)
nest_1   |     at Injector.instantiateClass (/api/node_modules/@nestjs/core/injector/injector.js:217:50)
nest_1   |     at callback (/api/node_modules/@nestjs/core/injector/injector.js:67:41)
nest_1   |     at processTicksAndRejections (internal/process/next_tick.js:81:5)
nest_1   |     at process.runNextTicks [as _tickCallback] (internal/process/next_tick.js:51:3)
nest_1   |     at Function.Module.runMain (internal/modules/cjs/loader.js:800:11)
nest_1   |     at executeUserCode (internal/bootstrap/node.js:526:15)
nest_1   |     at startMainThreadExecution (internal/bootstrap/node.js:439:3)
nest_1   | 2019-03-25T18:42:10: PM2 log: App [docker-nest-typegoose:0] exited with code [0] via signal [SIGABRT]
nest_1   | 2019-03-25T18:42:10: PM2 log: App [docker-nest-typegoose:0] starting in -fork mode-
nest_1   | 2019-03-25T18:42:10: PM2 log: App [docker-nest-typegoose:0] online
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant