Facing the issue for `ERR_REQUIRE_ESM` error when running the `require('wrap-ansi')` when type `vulcan catalog`
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:
The reason is that wrap-ansi install the latest version like the above is 8.1.0 after running the yarn why wrap-ansi
What's the correct behavior?
The correct be should be normal and show Ready on http://localhost:4200
Reproducing steps
@vulcan-sql/catalog-serverpackage to0.7.0in your projectvulcan 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.
- Remove the
node_modules - Add the below code at
package.jsonin your project
{
...
"resolutions": {
"wrap-ansi": "7.0.0"
}
}
- Run
yarnornpmto install again.
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!