You must call the cookieParser library in the server.js file of the program as follows so that your program can recognize this library.
app.use(cookieParser(process.env.COOKIE_PARSER_SECRET_KEY)); or app.use(cookieParser(secret_key));