Skip to content

[decap-cms-app] Module not found: Can't resolve 'decap-cms-lib-util/src/stega' #7401

Open
@eoneill

Description

@eoneill

Describe the bug

I'm using decap-cms-app directly (via import cms from 'decap-cms-app'). When rendering the preview pane, I get an import resolution error:

./node_modules/decap-cms-app/node_modules/decap-cms-core/dist/esm/components/Editor/EditorPreviewPane/EditorPreviewPane.js:14:1
Module not found: Can't resolve 'decap-cms-lib-util/src/stega'
  12 | import { lengths } from 'decap-cms-ui-default';
  13 | import { connect } from 'react-redux';
> 14 | import { encodeEntry } from 'decap-cms-lib-util/src/stega';
     | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^

This started happening when I bumped decap-cms-app to 3.6.1 and not present in 3.5.0.

import { encodeEntry } from 'decap-cms-lib-util/src/stega';

should probably import from dist/esm/, not from src/

import { encodeEntry } from 'decap-cms-lib-util/dist/esm/stega';

Applicable Versions:

  • decap-cms-app: 3.6.1
  • decap-cms-core: 3.6.0
  • decap-cms-lib-util: 3.2.0

I have this working locally with this patch-package patch:
decap-cms-app++decap-cms-core+3.6.0.patch

Metadata

Metadata

Assignees

No one assigned

    Labels

    type: bugcode to address defects in shipped code

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions