Skip to content

yaman3bd/keyv-nextjs-issue

Repository files navigation

Describe the bug I want to use keyv in my nextjs middleware to store/access some values from my app cache, I have set everything up as it was explained here: jaredwray/keyv#1065 it is working fine for all my server pages, except it throws an error when I import keyv in the middleware. the error only shows when I import keyv in the middleware or in a file I import it to use it in my middleware for example, import keyv in a helper file and import any helper func in the middleware it shows the same error the error: Screenshot 2024-06-27 at 10 49 34 PM

my deps:

"dependencies": {
    "@keyv/sqlite": "^3.6.7",
    "keyv": "^4.5.4",
    "next": "14.2.3",
    "react": "^18",
    "react-dom": "^18"
  },

How To Reproduce (best to provide workable code or tests!)

  1. clone the repo
  2. npm install
  3. npm run dev

open the project and it will throw the error

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors