Skip to content

bug: deps - clean-stack 5.3.0+ is not browser friendly - triggers Module build failed: UnhandledSchemeError: Reading from "node:url" #7616

@tresorama

Description

@tresorama

Background

This issue is extracted from a comment on an other issue that explain several problem of decap and it's dependencies.

Problem

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:

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

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions