Packages

@clerk/nextjs

7.10.2 · 17 Nov 2026MIT4.1M / weekRepositoryHomepagenpmAtom feed

Your version

4.27.7

12 Dec 2023Where it was published

4.31.8 is the newest release of 4.x.

npm marks 4.27.7 as deprecated: A critical security vulnerability that affects versions in the range of >= 4.7.0,< 4.29.3 has been discovered by the Clerk team. Please upgrade immediately to 4.29.3. For more information, refer to clerk.com/changelog/2024-01-12

In short

1 fixed

Security

1 advisory affects 4.27.7; 4.29.3 fixes them

Release note

Patch Changes

  • Use dynamic imports in <ClerkProvider /> which you import from @clerk/nextjs.

    Users on Next.js 12 and older can run into errors like these:

    error - ./node_modules/@clerk/nextjs/dist/esm/app-router/client/ClerkProvider.js:10:22
    Module not found: Can't resolve 'next/navigation'

    The aforementioned <ClerkProvider /> component contains code for both Next.js 12 (+ older) and Next.js 13 (+ newer). On older versions it can't find the imports only available in newer versions.

    If you're seeing these errors, you have to do two things:

    1. Update @clerk/nextjs to this version

    2. Update your next.config.js to ignore these imports:

      const webpack = require('webpack');
      
      /** @type {import('next').NextConfig} */
      const nextConfig = {
        reactStrictMode: true,
        webpack(config) {
          config.plugins.push(
            new webpack.IgnorePlugin({ resourceRegExp: /^next\/(navigation|headers|compat\/router)$/ }),
          );
          return config;
        },
      };
      
      module.exports = nextConfig;

      It is safe to ignore these modules as your Next.js 12 app won't hit these code paths.

A whole project to check? Paste its package.json in the dependency check: every deprecated, outdated or vulnerable dependency, with what to upgrade to. Free, no account.