Skip to content

Facing the issue for ERR_REQUIRE_ESM error when running the require('wrap-ansi') when type vulcan catalog #254

@kokokuo

Description

@kokokuo

Environment

  • Version:

    cli version: 0.7.0
    core version: 0.7.0
    build version: 0.7.0
    serve version: 0.7.0
    
  • OS: macOS

What's wrong?

When running vulcan catalog after installing the @vulcan-sql/catalog-server package to 0.7.0. Facing the issue for ERR_REQUIRE_ESM error when running the require('wrap-ansi'), like the below screenshot:

截圖 2023-07-25 下午5 39 37

The reason is that wrap-ansi install the latest version like the above is 8.1.0 after running the yarn why wrap-ansi

截圖 2023-07-25 下午5 50 14

What's the correct behavior?

The correct be should be normal and show Ready on http://localhost:4200

Reproducing steps

  1. @vulcan-sql/catalog-server package to 0.7.0 in your project
  2. vulcan catalog

Solution

The solution is to make the @vulcan-sql/catalog-server install the wrap-ansi at 7.0.0.

The current workaround

The workaround from @andreashimin shared.

  1. Remove the node_modules
  2. Add the below code at package.json in your project
{
 ...
 "resolutions": {
    "wrap-ansi": "7.0.0"
  }
}
  1. Run yarn or npm to install again.

Metadata

Metadata

Assignees

No one assigned

    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