0

I am unable to run my application because of this issue. (https://i.stack.imgur.com/hbSt5.png) <- image for reference

I have installed the mongoose npm package to connect with the mongodb but after installing the mongoose package and running the app it's throwing the error like

B:\angular\online\server\node_modules\mongodb\lib\collection.js:74 pkFactory: db.options?.pkFactory ?? utils_1.DEFAULT_PK_FACTORY, ^

SyntaxError: Invalid or unexpected token at Module._extensions..js (node:internal/modules/cjs/loader:1308:10)

And my application get crashed..

Ajjju001
  • 1
  • 1
  • I get results when searching that message on this site (such as [this one](https://stackoverflow.com/questions/75675925/syntax-and-database-connection-error-in-node-js)) – user20042973 Jul 15 '23 at 22:15
  • thank you. well i got this fix by down grading the mongoose version to 6.x.x something. if this issue resolve in the lastest version then i will let you guys know. – Ajjju001 Jul 17 '23 at 12:30

0 Answers0