Skip to content

Commit

Permalink
chore(repo): Version packages (#2320)
Browse files Browse the repository at this point in the history
Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
  • Loading branch information
clerk-cookie and github-actions[bot] committed Dec 12, 2023
1 parent ada4bd0 commit eb94116
Show file tree
Hide file tree
Showing 3 changed files with 40 additions and 37 deletions.
36 changes: 0 additions & 36 deletions .changeset/selfish-books-matter.md

This file was deleted.

39 changes: 39 additions & 0 deletions packages/nextjs/CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,44 @@
# Change Log

## 4.27.7

### Patch Changes

- Use dynamic imports in `<ClerkProvider />` 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 `<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
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
Expand Down
2 changes: 1 addition & 1 deletion packages/nextjs/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@clerk/nextjs",
"version": "4.27.6",
"version": "4.27.7",
"description": "Clerk SDK for NextJS",
"keywords": [
"clerk",
Expand Down

0 comments on commit eb94116

Please sign in to comment.