-
-
Notifications
You must be signed in to change notification settings - Fork 220
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
Upgrade npm-run-path
#1156
Upgrade npm-run-path
#1156
Conversation
I'm thinking of doing a minor release for this PR, and also to give a small shout-out to |
👍 |
@ehmicky Sorry to ping you here, not sure if it is worth its own issue, but this bump may trigger: sindresorhus/globby#260 I was trying to do a bundle including the dependencies with unbuild/rollup, and execa was a blocker in the release 9.4.0 because the new npm-run-path version. |
@rafael-lua Thanks for reporting this. @sindresorhus This is a problem with https://github.com/sindresorhus/unicorn-magic. It is being discussed with sindresorhus/globby#260 too, but basically would impact any package using Basically, the issue is that To make this work with some bundlers requires consumers to specify So, the problem is actually that consumers are misconfiguring their bundler. If they're using Node.js-specific code, they should specify that Node is the target. Which means that, one could argue, there's nothing wrong we're doing here, in principle. That being said, the above issue has quite many upvotes and it does seem to be causing some headaches to some users. It's fair to say that configuring bundlers is not always easy (especially Webpack) and it creates some confusion. So maybe there's some small fix we could do to help users out here? To me, it seems like What are your thoughts on this @sindresorhus? |
It's tempting to do that, but if packages always work around bad bundler DX, the bundlers will never have an incentive to improve.
I don't see why it would have to be limited to that.
Why should it? Isomorphic packages is intended use-case for conditional exports.
If anyone feels strongly enough to do the work, I would merge it, but it's also not something I plan to spend time on. |
Just to throw in - as a user of Managed to eventually track down this was due to the For context on Bundler configurations etc ... In this case I am using exaca within a next.js project, however it is not being used as part of the application code, but being used as part of some dev scripts that get run through tsx so it is not being bundled at all yet still encounters the dreaded error 😔. Couldn't figure out in what way I could effect its imports in this setup, so had to give up and downgrade. Just wanted to highlight - Still causing pain! |
This upgrades
npm-run-path
.https://github.com/sindresorhus/npm-run-path/releases/tag/v6.0.0
For users, this means when Execa manipulates the
PATH
environment variable (due toexecaNode()
or topreferLocal: true
), it might now do it slightly better in some edge cases.