Skip to content

Could not resolve "styled-components" react 19 #1526

@alenocera

Description

@alenocera
✘ [ERROR] Could not resolve "styled-components"

    node_modules/@smartbear/react-gherkin-editor/dist/components/GherkinEditor/styled.js:11:50:
      11 │ var styled_components_1 = __importDefault(require("styled-components"));
         ╵                                                   ~~~~~~~~~~~~~~~~~~~

  You can mark the path "styled-components" as external to exclude it from the bundle, which will
  remove this error and leave the unresolved path in the bundle. You can also surround this
  "require" call with a try/catch block to handle this failure at run-time instead of bundle-time.

✘ [ERROR] Could not resolve "styled-components"

    node_modules/@smartbear/react-gherkin-editor/dist/components/Toolbar/styled.js:11:50:
      11 │ var styled_components_1 = __importDefault(require("styled-components"));
         ╵                                                   ~~~~~~~~~~~~~~~~~~~

  You can mark the path "styled-components" as external to exclude it from the bundle, which will
  remove this error and leave the unresolved path in the bundle. You can also surround this
  "require" call with a try/catch block to handle this failure at run-time instead of bundle-time.

8:58:51 PM [vite] (client) error while updating dependencies:
Error: Build failed with 2 errors:
node_modules/@smartbear/react-gherkin-editor/dist/components/GherkinEditor/styled.js:11:50: ERROR: Could not resolve "styled-components"
node_modules/@smartbear/react-gherkin-editor/dist/components/Toolbar/styled.js:11:50: ERROR: Could not resolve "styled-components"

Facing this error my app isn't able to render at all. This error is blocking and it is critical. What can we do right now to continue to use the app with the new React19 version?
Without this changes, we must remove the package and look around for another package, that is kinda impossible to found because this package is super.

Thank you!

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions