From eb9411685bfdeab063b4fea32c3ca4a5ac6b849f Mon Sep 17 00:00:00 2001 From: Clerk Cookie <136073014+clerk-cookie@users.noreply.github.com> Date: Tue, 12 Dec 2023 16:34:45 +0200 Subject: [PATCH] chore(repo): Version packages (#2320) Co-authored-by: github-actions[bot] --- .changeset/selfish-books-matter.md | 36 --------------------------- packages/nextjs/CHANGELOG.md | 39 ++++++++++++++++++++++++++++++ packages/nextjs/package.json | 2 +- 3 files changed, 40 insertions(+), 37 deletions(-) delete mode 100644 .changeset/selfish-books-matter.md diff --git a/.changeset/selfish-books-matter.md b/.changeset/selfish-books-matter.md deleted file mode 100644 index 752b7c6b4c..0000000000 --- a/.changeset/selfish-books-matter.md +++ /dev/null @@ -1,36 +0,0 @@ ---- -'@clerk/nextjs': patch ---- - -Use dynamic imports in `` which you import from `@clerk/nextjs`. - -Users on Next.js 12 and older can run into errors like these: - -```shell -error - ./node_modules/@clerk/nextjs/dist/esm/app-router/client/ClerkProvider.js:10:22 -Module not found: Can't resolve 'next/navigation' -``` - -The aforementioned `` 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 -1. Update your `next.config.js` to ignore these imports: - - ```js - 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. diff --git a/packages/nextjs/CHANGELOG.md b/packages/nextjs/CHANGELOG.md index 32d433b339..c0421ffbf1 100644 --- a/packages/nextjs/CHANGELOG.md +++ b/packages/nextjs/CHANGELOG.md @@ -1,5 +1,44 @@ # Change Log +## 4.27.7 + +### Patch Changes + +- Use dynamic imports in `` which you import from `@clerk/nextjs`. ([#2292](https://github.com/clerk/javascript/pull/2292)) by [@LekoArts](https://github.com/LekoArts) + + Users on Next.js 12 and older can run into errors like these: + + ```shell + error - ./node_modules/@clerk/nextjs/dist/esm/app-router/client/ClerkProvider.js:10:22 + Module not found: Can't resolve 'next/navigation' + ``` + + The aforementioned `` 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 + 1. Update your `next.config.js` to ignore these imports: + + ```js + 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. + ## 4.27.6 ### Patch Changes diff --git a/packages/nextjs/package.json b/packages/nextjs/package.json index cae1fea90f..90a018c7c7 100644 --- a/packages/nextjs/package.json +++ b/packages/nextjs/package.json @@ -1,6 +1,6 @@ { "name": "@clerk/nextjs", - "version": "4.27.6", + "version": "4.27.7", "description": "Clerk SDK for NextJS", "keywords": [ "clerk",