Skip to content

TypeError: _crypto.getRandomValues is not a function #898

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
b1ew opened this issue Jan 24, 2025 · 3 comments
Open

TypeError: _crypto.getRandomValues is not a function #898

b1ew opened this issue Jan 24, 2025 · 3 comments

Comments

@b1ew
Copy link

b1ew commented Jan 24, 2025

Hi 👋,
I'm having trouble with session.save(), used within Next.js 15.1.5 /api/login/route
it throws error TypeError: _crypto.getRandomValues is not a function

Node v21.7.1

Image

What I'm missing here? can anyone shed a light..
Thanks!

@jasonvillalon
Copy link

im also experiencing this. did you find solution?

@jasonvillalon
Copy link

adding condition to only include turbo in next.config.js works for me

const nextConfig = {
  ...(process.env.NODE_ENV === 'development'
    ? {
      expireTime: 60 * 60,
      experimental: {
        turbo: {
           ... other settings here
        }
        ...
    } : {
      ... production settings here
    }
 )
}

@b1ew
Copy link
Author

b1ew commented Apr 3, 2025

im also experiencing this. did you find solution?

I end up dropping it and created my own auth handler

adding condition to only include turbo in next.config.js works for me

const nextConfig = {
  ...(process.env.NODE_ENV === 'development'
    ? {
      expireTime: 60 * 60,
      experimental: {
        turbo: {
           ... other settings here
        }
        ...
    } : {
      ... production settings here
    }
 )
}

experimental.turbo without child property?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants