Type error cannot add property next, object is not extensible

  Kiến thức lập trình

I am getting the error:
home/maxinejones/development/level-6/Recipe-Logger/node_modules/express/lib/router/index.js:161 req.next = next;
^

TypeError: Cannot add property next, object is not extensible
at Function.handle (/home/maxinejones/development/level-6/Recipe-Logger/node_modules/express/lib/router/index.js:161:12)
at Function.handle (/home/maxinejones/development/level-6/Recipe-Logger/node_modules/express/lib/application.js:181:10)
at app (/home/maxinejones/development/level-6/Recipe-Logger/node_modules/express/lib/express.js:39:9)
at Object. (/home/maxinejones/development/level-6/Recipe-Logger/server.js:11:1)
While I am trying to set up atlas, I am unsure what is causing the error, I know the code works because it works on my local server, however, when i try to use the mongodb atlas connection string, It doesn’t work.

The code will be posted shortly

1

LEAVE A COMMENT