Skip to content

Dependency scan fails: Unable to resolve import for ../locales/**/*.po. #6405

@anshiq

Description

@anshiq

When running the Cowswap frontend locally or inside a Docker dev container, the build process fails during dependency scanning due to an unresolved import for localization files.

Error Output

(!) Failed to run dependency scan. Skipping dependency pre-bundling.
Error: Failed to scan for dependencies from entries:
/workspaces/cowswap/apps/cowswap-frontend/index.html
/workspaces/cowswap/apps/cowswap-frontend/public/451.html

✘ [ERROR] Could not resolve import("../locales/**/*.po")

apps/cowswap-frontend/src/lib/i18n.tsx:86:33:
86 │ const catalog = await import(../locales/${locale}.po)

Steps to Reproduce

Clone the repository.

Install dependencies:

yarn

Start the development server:

yarn start

The build fails with the above error, both:

When running locally, and

When running inside the Docker dev container.
Can anyone please help me setting up.

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