-
Notifications
You must be signed in to change notification settings - Fork 41
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
referencing the cjs version instead of the esm version? #150
Comments
What version of In theory it should be Line 52 in af3145d
|
The output looks like $ yarn add yargs
...
$ yarn why string-width
├─ cliui@npm:8.0.1
│ └─ string-width@npm:4.2.3 (via npm:^4.2.0)
│
├─ wrap-ansi@npm:7.0.0
│ └─ string-width@npm:4.2.3 (via npm:^4.1.0)
│
└─ yargs@npm:17.7.2
└─ string-width@npm:4.2.3 (via npm:^4.2.3) |
success Saved lockfile. Yes you are right |
Is your problem resolved now @addlistener ? (I think it might be from your comment, but making sure!) |
Hmmm...not really. I switched to commander instead @shadowspawn but thanks for the kind response. The problem occurred when trying to pack the program with https://github.com/vercel/pkg The pkg packer is trying to pack with commonjs. However string-width is not commonjs. I remember trying aliasing string-width to string-width-cjs and it worked. |
Thanks for the clues @addlistener If you have a reproduction @archonic (saw your thumbs up), feel free to open another issue with new information. |
I have the same problem. I ran
https://github.com/open-cli-tools/concurrently Thanks. |
@ryancwalsh Try upgrading to yarn v1.22.22 or higher. See #159 |
@shadowspawn Interesting! I had seen that post already but I know I had upgraded yarn recently and thought I had the latest version (and below you'll see why). But when I ran https://github.com/yarnpkg/yarn/tags shows versions up to 1.22.22. People at #159 (comment) say that 1.22.22 helps. So I ran But upon closer inspection I guess it did nothing. Because now that I double-checked (because of your message), I see Then I found https://stackoverflow.com/a/55278430/470749 and ran Then I ran:
And it works! You were right. I apologize for wasting your time. And I appreciate how quick and helpful your response was! |
Check the code here
cliui/lib/cjs.ts
Lines 3 to 5 in af3145d
Should we require strip-ansi-cjs instead of strip-ansi?
Here are my errors
The text was updated successfully, but these errors were encountered: