Next.js Discord

Discord Forum

cannot find package 'jose' after build

Unanswered
American black bear posted this in #help-forum
Open in Discord
American black bearOP
hey there,

I'm using nextjs 15.3.4 in combination with firebase and firebase-admin and i suspet that they are causing an issue with another package "jose", which results in the following stdout/stderr when trying to navigate to the / route of a newly built application
❯ docker run -it --rm -p 3000:3000 hint-platform
   ▲ Next.js 15.3.4
   - Local:        http://localhost:3000
   - Network:      http://0.0.0.0:3000

 ✓ Starting...
 ✓ Ready in 484ms
 ⨯ error: Cannot find package 'jose' from '/app/node_modules/jwks-rsa/src/utils.js'


For context, everything works fine in devmode, but as soon as i build it, this error occrus when trying to run the application. I have no dependency on a package called jose, so i suspect that it's a dependency of some of my authentication libs in the project, mainly firebase and firebase-admin

7 Replies