Skip to content
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

Next.js 13.2 incompatibility #863

Closed
4 of 19 tasks
hugo-vrijswijk opened this issue Feb 24, 2023 · 3 comments
Closed
4 of 19 tasks

Next.js 13.2 incompatibility #863

hugo-vrijswijk opened this issue Feb 24, 2023 · 3 comments
Assignees

Comments

@hugo-vrijswijk
Copy link

Package + Version

  • @clerk/clerk-js
  • @clerk/clerk-react
  • @clerk/nextjs
  • @clerk/remix
  • @clerk/types
  • @clerk/themes
  • @clerk/localizations
  • @clerk/clerk-expo
  • @clerk/backend
  • @clerk/clerk-sdk-node
  • @clerk/shared
  • @clerk/fastify
  • gatsby-plugin-clerk
  • build/tooling/chore
  • other:

Version:

4.10.2

Node 18

Browser/OS

Vercel build CI/locally

Description

When upgrading to Next.js 13.2, I get the following error when trying to build:

[05:12:51.947] build: info  - Creating an optimized production build...
[05:13:00.423] build: <w> [webpack.cache.PackFileCacheStrategy] Serializing big strings (288kiB) impacts deserialization performance (consider using Buffer instead and decode when needed)
[05:13:00.431] build: <w> [webpack.cache.PackFileCacheStrategy] Serializing big strings (110kiB) impacts deserialization performance (consider using Buffer instead and decode when needed)
[05:13:00.577] build: Failed to compile.
[05:13:00.577] build: 
[05:13:00.577] build: node:buffer
[05:13:00.577] build: Module build failed: UnhandledSchemeError: Reading from "node:buffer" is not handled by plugins (Unhandled scheme).
[05:13:00.578] build: Webpack supports "data:" and "file:" URIs by default.
[05:13:00.578] build: You may need an additional plugin to handle "node:" URIs.
[05:13:00.578] build:     at /vercel/path0/node_modules/next/dist/compiled/webpack/bundle5.js:28:395974
[05:13:00.578] build:     at Hook.eval [as callAsync] (eval at create (/vercel/path0/node_modules/next/dist/compiled/webpack/bundle5.js:13:28771), <anonymous>:6:1)
[05:13:00.578] build:     at Object.processResource (/vercel/path0/node_modules/next/dist/compiled/webpack/bundle5.js:28:395899)
[05:13:00.578] build:     at processResource (/vercel/path0/node_modules/next/dist/compiled/loader-runner/LoaderRunner.js:1:5308)
[05:13:00.578] build:     at iteratePitchingLoaders (/vercel/path0/node_modules/next/dist/compiled/loader-runner/LoaderRunner.js:1:4667)
[05:13:00.578] build:     at runLoaders (/vercel/path0/node_modules/next/dist/compiled/loader-runner/LoaderRunner.js:1:8590)
[05:13:00.578] build:     at NormalModule._doBuild (/vercel/path0/node_modules/next/dist/compiled/webpack/bundle5.js:28:395761)
[05:13:00.578] build:     at NormalModule.build (/vercel/path0/node_modules/next/dist/compiled/webpack/bundle5.js:28:397789)
[05:13:00.578] build:     at /vercel/path0/node_modules/next/dist/compiled/webpack/bundle5.js:28:81243
[05:13:00.578] build:     at NormalModule.needBuild (/vercel/path0/node_modules/next/dist/compiled/webpack/bundle5.js:28:401868)
[05:13:00.579] build: 
[05:13:00.579] build: Import trace for requested module:
[05:13:00.579] build: node:buffer
[05:13:00.579] build: ./node_modules/node-fetch-native/dist/index.mjs
[05:13:00.579] build: ./node_modules/@clerk/backend/dist/runtime/node/fetch.js
[05:13:00.579] build: ./node_modules/@clerk/backend/dist/esm/index.js
[05:13:00.579] build: ./node_modules/@clerk/nextjs/dist/server/clerk.js
[05:13:00.579] build: ./node_modules/@clerk/nextjs/dist/server/index.js
[05:13:00.579] build: ./node_modules/@clerk/nextjs/server.js
[05:13:00.579] build: 
[05:13:00.580] build: node:crypto
[05:13:00.580] build: Module build failed: UnhandledSchemeError: Reading from "node:crypto" is not handled by plugins (Unhandled scheme).
[05:13:00.580] build: Webpack supports "data:" and "file:" URIs by default.
[05:13:00.580] build: You may need an additional plugin to handle "node:" URIs.
[05:13:00.580] build:     at /vercel/path0/node_modules/next/dist/compiled/webpack/bundle5.js:28:395974
[05:13:00.580] build:     at Hook.eval [as callAsync] (eval at create (/vercel/path0/node_modules/next/dist/compiled/webpack/bundle5.js:13:28771), <anonymous>:6:1)
[05:13:00.581] build:     at Hook.CALL_ASYNC_DELEGATE [as _callAsync] (/vercel/path0/node_modules/next/dist/compiled/webpack/bundle5.js:13:25925)
[05:13:00.581] build:     at Object.processResource (/vercel/path0/node_modules/next/dist/compiled/webpack/bundle5.js:28:395899)
[05:13:00.581] build:     at processResource (/vercel/path0/node_modules/next/dist/compiled/loader-runner/LoaderRunner.js:1:5308)
[05:13:00.581] build:     at iteratePitchingLoaders (/vercel/path0/node_modules/next/dist/compiled/loader-runner/LoaderRunner.js:1:4667)
[05:13:00.581] build:     at runLoaders (/vercel/path0/node_modules/next/dist/compiled/loader-runner/LoaderRunner.js:1:8590)
[05:13:00.581] build:     at NormalModule._doBuild (/vercel/path0/node_modules/next/dist/compiled/webpack/bundle5.js:28:395761)
[05:13:00.582] build:     at NormalModule.build (/vercel/path0/node_modules/next/dist/compiled/webpack/bundle5.js:28:397789)
[05:13:00.582] build:     at /vercel/path0/node_modules/next/dist/compiled/webpack/bundle5.js:28:81243
[05:13:00.582] build: 
[05:13:00.582] build: Import trace for requested module:
[05:13:00.582] build: node:crypto
[05:13:00.582] build: ./node_modules/@clerk/backend/dist/runtime/node/crypto.js
[05:13:00.582] build: ./node_modules/@clerk/backend/dist/esm/index.js
[05:13:00.582] build: ./node_modules/@clerk/nextjs/dist/server/clerk.js
[05:13:00.582] build: ./node_modules/@clerk/nextjs/dist/server/index.js
[05:13:00.582] build: ./node_modules/@clerk/nextjs/server.js
[05:13:00.583] build: 
[05:13:00.583] build: node:fs
[05:13:00.583] build: Module build failed: UnhandledSchemeError: Reading from "node:fs" is not handled by plugins (Unhandled scheme).
[05:13:00.583] build: Webpack supports "data:" and "file:" URIs by default.
[05:13:00.583] build: You may need an additional plugin to handle "node:" URIs.
[05:13:00.583] build:     at /vercel/path0/node_modules/next/dist/compiled/webpack/bundle5.js:28:395974
[05:13:00.583] build:     at Hook.eval [as callAsync] (eval at create (/vercel/path0/node_modules/next/dist/compiled/webpack/bundle5.js:13:28771), <anonymous>:6:1)
[05:13:00.583] build:     at Object.processResource (/vercel/path0/node_modules/next/dist/compiled/webpack/bundle5.js:28:395899)
[05:13:00.583] build:     at processResource (/vercel/path0/node_modules/next/dist/compiled/loader-runner/LoaderRunner.js:1:5308)
[05:13:00.583] build:     at iteratePitchingLoaders (/vercel/path0/node_modules/next/dist/compiled/loader-runner/LoaderRunner.js:1:4667)
[05:13:00.583] build:     at runLoaders (/vercel/path0/node_modules/next/dist/compiled/loader-runner/LoaderRunner.js:1:8590)
[05:13:00.583] build:     at NormalModule._doBuild (/vercel/path0/node_modules/next/dist/compiled/webpack/bundle5.js:28:395761)
[05:13:00.583] build:     at NormalModule.build (/vercel/path0/node_modules/next/dist/compiled/webpack/bundle5.js:28:397789)
[05:13:00.583] build:     at /vercel/path0/node_modules/next/dist/compiled/webpack/bundle5.js:28:81243
[05:13:00.584] build:     at NormalModule.needBuild (/vercel/path0/node_modules/next/dist/compiled/webpack/bundle5.js:28:401868)
[05:13:00.584] build: 
[05:13:00.584] build: Import trace for requested module:
[05:13:00.584] build: node:fs
[05:13:00.584] build: ./node_modules/node-fetch-native/dist/index.mjs
[05:13:00.584] build: ./node_modules/@clerk/backend/dist/runtime/node/fetch.js
[05:13:00.584] build: ./node_modules/@clerk/backend/dist/esm/index.js
[05:13:00.584] build: ./node_modules/@clerk/nextjs/dist/server/clerk.js
[05:13:00.584] build: ./node_modules/@clerk/nextjs/dist/server/index.js
[05:13:00.584] build: ./node_modules/@clerk/nextjs/server.js
[05:13:00.584] build: 
[05:13:00.584] build: node:https
[05:13:00.584] build: Module build failed: UnhandledSchemeError: Reading from "node:https" is not handled by plugins (Unhandled scheme).
[05:13:00.584] build: Webpack supports "data:" and "file:" URIs by default.
[05:13:00.584] build: You may need an additional plugin to handle "node:" URIs.
[05:13:00.584] build:     at /vercel/path0/node_modules/next/dist/compiled/webpack/bundle5.js:28:395974
[05:13:00.584] build:     at Hook.eval [as callAsync] (eval at create (/vercel/path0/node_modules/next/dist/compiled/webpack/bundle5.js:13:28771), <anonymous>:6:1)
[05:13:00.585] build:     at Object.processResource (/vercel/path0/node_modules/next/dist/compiled/webpack/bundle5.js:28:395899)
[05:13:00.585] build:     at processResource (/vercel/path0/node_modules/next/dist/compiled/loader-runner/LoaderRunner.js:1:5308)
[05:13:00.585] build:     at iteratePitchingLoaders (/vercel/path0/node_modules/next/dist/compiled/loader-runner/LoaderRunner.js:1:4667)
[05:13:00.585] build:     at runLoaders (/vercel/path0/node_modules/next/dist/compiled/loader-runner/LoaderRunner.js:1:8590)
[05:13:00.585] build:     at NormalModule._doBuild (/vercel/path0/node_modules/next/dist/compiled/webpack/bundle5.js:28:395761)
[05:13:00.585] build:     at NormalModule.build (/vercel/path0/node_modules/next/dist/compiled/webpack/bundle5.js:28:397789)
[05:13:00.585] build:     at /vercel/path0/node_modules/next/dist/compiled/webpack/bundle5.js:28:81243
[05:13:00.585] build:     at NormalModule.needBuild (/vercel/path0/node_modules/next/dist/compiled/webpack/bundle5.js:28:401868)
[05:13:00.585] build: 
[05:13:00.586] build: Import trace for requested module:
[05:13:00.587] build: node:https
[05:13:00.587] build: ./node_modules/node-fetch-native/dist/index.mjs
[05:13:00.587] build: ./node_modules/@clerk/backend/dist/runtime/node/fetch.js
[05:13:00.587] build: ./node_modules/@clerk/backend/dist/esm/index.js
[05:13:00.587] build: ./node_modules/@clerk/nextjs/dist/server/clerk.js
[05:13:00.587] build: ./node_modules/@clerk/nextjs/dist/server/index.js
[05:13:00.587] build: ./node_modules/@clerk/nextjs/server.js
[05:13:00.587] build: 
[05:13:00.587] build: node:http
[05:13:00.587] build: Module build failed: UnhandledSchemeError: Reading from "node:http" is not handled by plugins (Unhandled scheme).
[05:13:00.587] build: Webpack supports "data:" and "file:" URIs by default.
[05:13:00.587] build: You may need an additional plugin to handle "node:" URIs.
[05:13:00.587] build:     at /vercel/path0/node_modules/next/dist/compiled/webpack/bundle5.js:28:395974
[05:13:00.587] build:     at Hook.eval [as callAsync] (eval at create (/vercel/path0/node_modules/next/dist/compiled/webpack/bundle5.js:13:28771), <anonymous>:6:1)
[05:13:00.587] build:     at Object.processResource (/vercel/path0/node_modules/next/dist/compiled/webpack/bundle5.js:28:395899)
[05:13:00.587] build:     at processResource (/vercel/path0/node_modules/next/dist/compiled/loader-runner/LoaderRunner.js:1:5308)
[05:13:00.587] build:     at iteratePitchingLoaders (/vercel/path0/node_modules/next/dist/compiled/loader-runner/LoaderRunner.js:1:4667)
[05:13:00.587] build:     at runLoaders (/vercel/path0/node_modules/next/dist/compiled/loader-runner/LoaderRunner.js:1:8590)
[05:13:00.587] build:     at NormalModule._doBuild (/vercel/path0/node_modules/next/dist/compiled/webpack/bundle5.js:28:395761)
[05:13:00.587] build:     at NormalModule.build (/vercel/path0/node_modules/next/dist/compiled/webpack/bundle5.js:28:397789)
[05:13:00.587] build:     at /vercel/path0/node_modules/next/dist/compiled/webpack/bundle5.js:28:81243
[05:13:00.587] build:     at NormalModule.needBuild (/vercel/path0/node_modules/next/dist/compiled/webpack/bundle5.js:28:401868)
[05:13:00.587] build: 
[05:13:00.587] build: Import trace for requested module:
[05:13:00.587] build: node:http
[05:13:00.588] build: ./node_modules/node-fetch-native/dist/index.mjs
[05:13:00.588] build: ./node_modules/@clerk/backend/dist/runtime/node/fetch.js
[05:13:00.588] build: ./node_modules/@clerk/backend/dist/esm/index.js
[05:13:00.588] build: ./node_modules/@clerk/nextjs/dist/server/clerk.js
[05:13:00.588] build: ./node_modules/@clerk/nextjs/dist/server/index.js
[05:13:00.588] build: ./node_modules/@clerk/nextjs/server.js
[05:13:00.588] build: 
[05:13:00.589] build: 
[05:13:00.589] build: > Build failed because of webpack errors
@nikosdouvlis
Copy link
Member

Hello @hugo-vrijswijk ,

The NextJS team has made some recent webpack config changes (here and here) on their end that affect how isomorphic packages (like our clerk/backend package) making use of these runtime keys will be imported.

We've already updated our package configuration to account for these changes on our staging tag - we'll be deploying the changes to our stable latest tag within the next couple of hours. :)

@nikosdouvlis nikosdouvlis self-assigned this Feb 24, 2023
@perkinsjr
Copy link
Contributor

Hi Hugo,

The package is now out on latest tag (4.11.0)

Please let us know if you run into any issues.

@hugo-vrijswijk
Copy link
Author

Works great! Fantastic work, thank you 😁

@github-actions github-actions bot locked as resolved and limited conversation to collaborators Jun 6, 2023
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants