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

fix(core): add dependency for cliui + string-width #9967

Merged
merged 1 commit into from Apr 22, 2022

Conversation

FrozenPandaz
Copy link
Collaborator

Current Behavior

When astro is installed, Nx commands error as they are unable to import string-width?

require() of ES Module D:\foo\node_modules\.pnpm\string-width@5.1.2\node_modules\string-width\index.js from D:\foo\node_modules\.pnpm\nx@14.0.1\node_modules\nx\src\utils\print-help.js not supported.
Instead change the require of index.js in D:\foo\node_modules\.pnpm\nx@14.0.1\node_modules\nx\src\utils\print-help.js to a dynamic import() which is available in all CommonJS modules.

Expected Behavior

Nx brings its own version of string-width and isn't broken when installing other package?

@JamesHenry I understand we wanted to transitively depend on these dependencies but I wonder if there's a way that yargs exposes itself that we can use to do this? 🤷

Better to maintain the version ourselves than to throw errors.

Related Issue(s)

Fixes https://nrwlcommunity.slack.com/archives/CMFKWPU6Q/p1650660946152879

@nx-cloud
Copy link

nx-cloud bot commented Apr 22, 2022

☁️ Nx Cloud Report

CI is running/has finished running commands for commit 2f0e80c. As they complete they will appear below. Click to see the status, the terminal output, and the build insights.

📂 See all runs for this branch


✅ Successfully ran 16 targets

Sent with 💌 from NxCloud.

@vercel
Copy link

vercel bot commented Apr 22, 2022

The latest updates on your projects. Learn more about Vercel for Git ↗︎

Name Status Preview Updated
nx-dev ✅ Ready (Inspect) Visit Preview Apr 22, 2022 at 10:30PM (UTC)

@github-actions
Copy link

This pull request has already been merged/closed. If you experience issues related to these changes, please open a new issue referencing this pull request.

@github-actions github-actions bot locked as resolved and limited conversation to collaborators Mar 18, 2023
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

1 participant