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
If you opt for using decap via npm install , opposed to cdn, and your bundler is webpack (next.js uses it), you get this error in the browser runtime on page load of the cms page
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/.pnpm/clean-stack@5.3.0/node_modules/clean-stack/index.js
./node_modules/.pnpm/decap-cms-core@3.8.1_@emotion+react@11.14.0_@types+react@18.3.24_react@18.3.1__@emotion_a50ca47a6744b7ce5e4028262924054d/node_modules/decap-cms-core/dist/esm/components/UI/ErrorBoundary.js
...
The reason is:
decap uses clean-stack under the hood
clean-stack is a library built with focus on server usage (node)
clean-stack 5.3.0+ introduced new code that uses node:url, and this is not present in browser
Here is the code addition that breaks webpack sindresorhus/clean-stack@7eb47b8
Potential Solution
Short-term:
fix clean-stack at 5.2.0 for now (latest version without node:url addition)
Long-term:
switch to a different library that has the goal of being browser-friendly
martinjagodic, meganfilo, tototjc and danwulffcolelawrence