vulcan-sql icon indicating copy to clipboard operation
vulcan-sql copied to clipboard

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

Open kokokuo opened this issue 2 years ago • 1 comments

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.

kokokuo avatar Jul 25 '23 09:07 kokokuo

Hi guys, if you are also facing the issue, you can use the workaround mentioned above to solve it for now. We will fix it and release a new version as soon as possible! Hope you enjoy using VulcanSQL!

kokokuo avatar Jul 26 '23 03:07 kokokuo