-
Notifications
You must be signed in to change notification settings - Fork 81
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
Issue while starting the application. #10
Comments
Try connecting to a DBMS of your choice and see if the same error occurs. |
i am trying to connect to mongodb and the error occurs. |
also there is this error when running yarn start:dev [2:52:42 PM] Starting compilation in watch mode... src/infra/logger/service.ts:142:7 - error TS2322: Type 'Logger' is not assignable to type 'Logger'. 142 logger: pinoLogger, node_modules/pino-http/index.d.ts:26:5 src/modules/user/module.ts:40:15 - error TS2322: Type 'Model<unknown, unknown, unknown, {}, Document<unknown, unknown, unknown> & Omit<Required<{ _id: unknown; }>, never>, UserDocument>' is not assignable to type 'MongoRepositoryModelSessionType<PaginateModel<UserDocument, {}, {}>>'. 40 const repository: MongoRepositoryModelSessionType<PaginateModel> = connection.model< node_modules/mongoose-paginate-v2/index.d.ts:104:5 src/modules/user/module.ts:43:22 - error TS2345: Argument of type 'Schema<User, Model<User, any, any, any, Document<unknown, any, User> & User & Required<{ _id: string; }>, any>, {}, {}, {}, {}, DefaultSchemaOptions, User, Document<...> & ... 1 more ... & Required<...>>' is not assignable to parameter of type 'Schema<UserDocument, any, any, {}, any, any, any, UserDocument | ({ createdAt: NativeDate; updatedAt: NativeDate; } & Document<any, any, any> & UserEntity), Document<...> & ((FlatRecord<...> & { ...; }) | (FlatRecord<...> & { ...; }))>'. 43 >(User.name, UserSchema); [2:52:48 PM] Found 3 errors. Watching for file changes. |
@mikemajesty any solutions? |
Can you share your repo? |
@mikemajesty can you address the issue here? |
This error happens from version 7 of mongoose. |
even with the specified packages. i am still getting the error. this is my package.json { [11:43:42 AM] Found 0 errors. Watching for file changes. TRACE [18/11/2023 02:58:44]: CacheMemory connected! [sequelize] Executed (default): SELECT table_name FROM information_schema.tables WHERE table_schema = 'public' AND table_name = 'cats' 3ms /home/nitesh/Development/nestjs-microservice-boilerplate-api/node_modules/mongodb/src/sdam/topology.ts:591 |
the docker containers are up and running successfully but i cannot even connect to the replicaset to my mongodb compass. |
I also had connection problems. |
@neeteshraj @vinhcv161 try this branch: branch |
remove
nest-cli.json |
still not connected |
Please, try it: (add for local singleton: directConnection=true) MONGO#FOR STANDALONE: |
|
I am having similar issue I could connect to Mongo if I just use MONGO_URL=mongodb://admin:[email protected]:27017 connection string but then users collection is not to be seen anywhere is in MongoDB |
silly me, saw your new .env !! connection string - working now. |
I am running on Ubuntu 23. I have cloned the project and then ran
yarn infra
the docker containers are up and running successfully. But while trying to run the command
yarn start:dev
i am getting connection error in mongo db.Help me
Here is the error
[6:41:36 PM] File change detected. Starting incremental compilation...
[6:41:36 PM] Found 0 errors. Watching for file changes.
Tracing terminated
(node:53467) [DEP0040] DeprecationWarning: The
punycode
module is deprecated. Please use a userland alternative instead.(Use
node --trace-deprecation ...
to show where the warning was created)TRACE [16/11/2023 09:56:38]: CacheMemory connected!
TRACE [16/11/2023 09:56:38]: Redis connected!
[sequelize] Executed (default): SELECT table_name FROM information_schema.tables WHERE table_schema = 'public' AND table_name = 'cats' 4ms
[sequelize] Executed (default): SELECT i.relname AS name, ix.indisprimary AS primary, ix.indisunique AS unique, ix.indkey AS indkey, array_agg(a.attnum) as column_indexes, array_agg(a.attname) AS column_names, pg_get_indexdef(ix.indexrelid) AS definition FROM pg_class t, pg_class i, pg_index ix, pg_attribute a WHERE t.oid = ix.indrelid AND i.oid = ix.indexrelid AND a.attrelid = t.oid AND t.relkind = 'r' and t.relname = 'cats' GROUP BY i.relname, ix.indexrelid, ix.indisprimary, ix.indisunique, ix.indkey ORDER BY i.relname; 3ms
TRACE [16/11/2023 09:56:38]: Sequelize connected!
(node:53467) [DEP0040] DeprecationWarning: The
punycode
module is deprecated. Please use a userland alternative instead.(Use
node --trace-deprecation ...
to show where the warning was created)/home/nitesh-raj-khanal/Development/nestjs-microservice-boilerplate-api/node_modules/pino-mongodb/node_modules/mongodb/src/sdam/topology.ts:591
const timeoutError = new MongoServerSelectionError(
^
MongoServerSelectionError: Server selection timed out after 5000 ms
at Timeout._onTimeout (/home/nitesh-raj-khanal/Development/nestjs-microservice-boilerplate-api/node_modules/pino-mongodb/node_modules/mongodb/src/sdam/topology.ts:591:30)
at listOnTimeout (node:internal/timers:573:17)
at processTimers (node:internal/timers:514:7)
The text was updated successfully, but these errors were encountered: