Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[package manager]: string-width is resolved incorrectly, causing ERR_REQUIRE_ESM #7539

Closed
msonnberger opened this issue Dec 8, 2023 · 5 comments · Fixed by #10240
Closed
Labels
bug Something isn't working

Comments

@msonnberger
Copy link

What version of Bun is running?

1.0.15+b3bdf22eb

What platform is your computer?

Darwin 23.1.0 arm64 arm

What steps can reproduce the bug?

  1. see Dependency on @isaacs/cliui@8.0.2 is broken isaacs/jackspeak#5 (comment)
  2. run vite build

What is the expected behavior?

the build should pass

What do you see instead?

Error [ERR_REQUIRE_ESM]: require() of ES Module /vercel/path0/node_modules/string-width/index.js from /vercel/path0/node_modules/wide-align/align.js not supported.

Additional information

Same issue exists in yarn v1:
storybookjs/storybook#22431
isaacs/jackspeak#5

@msonnberger msonnberger added the bug Something isn't working label Dec 8, 2023
@kgoedecke
Copy link

@msonnberger did you ever manage to resolve this, we ran into the same issue today.

@msonnberger
Copy link
Author

@msonnberger did you ever manage to resolve this, we ran into the same issue today.

unfortunately, no :(

@joeychilson
Copy link

@kgoedecke @msonnberger

I don't know if you guys still need a fix, but here is what worked for me.

Add the following to package.json

  "resolutions": {
    "string-width": "4.2.3"
  }

@hyoretsu
Copy link

hyoretsu commented Apr 6, 2024

Bump, this is pretty annoying to encounter

@themixednuts
Copy link

I have this issue as well when deploying to Vercel, and unfortunately the resolution fix doesn't work

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
5 participants