Skip to content

braden-clerk/middleware-bug

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

3 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Middleware bug

Demonstrates how you can't read env vars inside of packages used in next middleware. I'm demonstrating using the clerk package -- but it's still a trivial example.

Run:

yarn

#

yarn dev

Open http://localhost:3000/api/hello in your browser to see the error.

Notes:

The code that is throwing this in the clerk package is:

key = process.env.CLERK_JWT_KEY;
if (!key) {
  throw new Error("Missing jwt key");
}

Downgrade next to 12.0.4 to see that you no longer get the error.

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published