You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I'm encountering an issue when wrapping my provider component in layout.tsx using Next.js 14.2.23 and Node.js v20.18.0. The following error occurs during the build process:
Module build failed: UnhandledSchemeError: Reading from "node:url" is not handled by plugins (Unhandled scheme).
Webpack supports "data:" and "file:" URIs by default.
You may need an additional plugin to handle "node:" URIs.
Reproduction Steps:
I'm using the following StarknetProvider.tsx component:
Looks like one of the dependencies is using node:url as package. Can you provide the full stack trace please? You can also try to grep for that string in your node_modules to see which dependency it is.
From the documentation it looks like it shouldn't be a problem because they polyfill that dependency.
After investigating further, I found that the issue seems to stem from one of the dependencies using node:url. Here is the import trace for the requested module:
Module build failed: UnhandledSchemeError: Reading from "node:url" is not handled by plugins (Unhandled scheme).
Webpack supports "data:" and "file:" URIs by default.
You may need an additional plugin to handle "node:" URIs.
Import trace for requested module:
node:url
./node_modules/tough-cookie/dist/cookie/canonicalDomain.js
./node_modules/tough-cookie/dist/cookie/index.js
./node_modules/fetch-cookie/esm/index.js
./node_modules/starknet/dist/index.mjs
./node_modules/@starknet-react/core/dist/index.js
./src/components/Providers.tsx
Based on this trace, it seems the tough-cookie package is using the node:url module, which causes the Webpack error.
From the documentation, it seems node:url should be polyfilled, but I am still encountering the error.
Could you please suggest if there's a workaround to either handle this polyfill issue or if any additional Webpack configuration is needed? Thank you!
I'm encountering an issue when wrapping my provider component in
layout.tsx
using Next.js 14.2.23 and Node.js v20.18.0. The following error occurs during the build process:Reproduction Steps:
I'm using the following
StarknetProvider.tsx
component:I am using this provider in
layout.tsx
:Expected Behavior:
The app should build successfully without errors related to Webpack schemes.
Actual Behavior:
The build fails with the following error message:
Environment:
Request:
Could you provide guidance on how to handle this error? Is this a Webpack configuration issue or an import issue with the Next.js version I'm using?
The text was updated successfully, but these errors were encountered: