-
-
Notifications
You must be signed in to change notification settings - Fork 2.8k
chore: prefix all nx package scripts with npx #7988
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
chore: prefix all nx package scripts with npx #7988
Conversation
Thanks for the PR, @JoshuaKGoldberg! typescript-eslint is a 100% community driven project, and we are incredibly grateful that you are contributing to that community. The core maintainers work on this in their personal time, so please understand that it may not be possible for them to review your work immediately. Thanks again! 🙏 Please, if you or your company is finding typescript-eslint valuable, help us sustain the project by sponsoring it transparently on https://opencollective.com/typescript-eslint. |
✅ Deploy Preview for typescript-eslint ready!
To edit notification comments on pull requests, go to your Netlify site configuration. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I'm not too familiar with the inner workings of npx
but wont this use whatever version is installed globally and if none is found prompt the user to install it?
This repository also doesn't use npm
so this doesn't seem like an ideal solution.
If what you're after is using the nx
version installed in the root workspace then you should use yarn run -T nx
or run -T nx
.
If not then you should add nx
as a dependency to each workspace that needs it.
Ref https://yarnpkg.com/getting-started/qa#how-to-share-scripts-between-workspaces
Ref #7987 (comment)
Could we just add nx as a dep and then prefix with yarn instead? |
Swapping
Same with cc @JamesHenry too |
Yeah I'm not quite sure - I would have thought that IDK how Yarn3 works - you didn't need to do that with yarn1 as it'd just look in the parent folder. |
How frustrating yeah this definitely worked fine in yarn 1. FWIW you can also install nx globally one time and it will always work as well, it will resolve your most local installation possible before attempting to run the actually globally installed code. I’ll need to play with this to get a real sense of what might optimal here, I’m afraid I lost all of the weekend because of moving apartments and my next availability will be this coming weekend, so feel free to do whatever makes the most sense in the immediate term if this is blocking |
PR Checklist
Overview
Prefixes all the commands that use
nx
withnpx
.