nodist
nodist copied to clipboard
Add support for npx
NPX has been released as part of npm. Seems like a pretty handy tool to have included with nodist. https://medium.com/@maybekatz/introducing-npx-an-npm-package-runner-55f7d4bd282b
Unless I am not following the new NPX solution correctly this should be coming with the latest version of NPM.
Here was my procedure
> nodist 8
> nodist npm 5.2.x
>node -v
v8.1.3
>npm -v
5.2.0
>npx -v
9.0.3
Hope this helps
It does come with npm, but, unless I'm mistaken, nodist works by putting shims in place for node and npm and sets your path to %PROGRAM_FILES%\Nodist\bin. I would think a similar shim would need to be in place for npx. What does your path look like? In the meantime, I've just done a global install for npx.
> nodist npm
3.10.10
4.0.5
4.5.0
5.0.3
* 5.3.0 (global: 5)
> nodist
(x64)
7.2.1
7.8.0
7.9.0
* 8.1.4 (global: latest)
> npm -v
5.3.0
> node -v
v8.1.4
> nodist -v
0.8.8
> which npm
/cygdrive/c/Program Files (x86)/Nodist/bin/npm
> which node
/cygdrive/c/Program Files (x86)/Nodist/bin/node
> which nodist
/cygdrive/c/Program Files (x86)/Nodist/bin/nodist
> npx
> which npx
/usr/bin/which: no npx in (.../cygdrive/c/Program Files (x86)/Nodist/bin:...)
(I left out most of the directories. This is the only referenced Nodist in my path)
Thanks for mentioning to do a global install of npx, sorted it for me.
Would this shim be easy to implement?
Would it just be a copy-paste of https://github.com/nullivex/nodist/blob/bd91bfa4d1bd452a7ef36d3a4112aec1851e9c6b/src/shim-npm.go and adding it to build.js, similar to this? https://github.com/nullivex/nodist/blob/bd91bfa4d1bd452a7ef36d3a4112aec1851e9c6b/build/build.js#L174
Installing npx globally does not work anymore for all packages. Because the npx package is deprecated and contains the old npm 5 version. Npx tries to run the packages with it's own npm version in it's node_modules folder. Some packages rely on npm version 6 or higher.
@nullivex Are there plans to shim the npx cli that is included since in npm 6?
Yes, I can make that happen. Should have the time within the next week.
any update on this? thanks!
I had a family emergency that interrupted my workflow. Updates coming.
On Wed, Oct 20, 2021 at 10:32 AM steve-nickerson @.***> wrote:
any update on this? thanks!
— You are receiving this because you were mentioned. Reply to this email directly, view it on GitHub https://github.com/nullivex/nodist/issues/205#issuecomment-947837086, or unsubscribe https://github.com/notifications/unsubscribe-auth/AARWXX74ILU6TOFX2BHYUDDUH3VLLANCNFSM4DSRUQRQ . Triage notifications on the go with GitHub Mobile for iOS https://apps.apple.com/app/apple-store/id1477376905?ct=notification-email&mt=8&pt=524675 or Android https://play.google.com/store/apps/details?id=com.github.android&referrer=utm_campaign%3Dnotification-email%26utm_medium%3Demail%26utm_source%3Dgithub.
-- Bryan Tong, President and CEO @.***
This communication is for the use of the intended recipient only. It may contain information that is privileged and confidential. If you are not the intended recipient of this communication, any disclosure, copying, further distribution or use thereof is prohibited. If you have received this communication in error, please advise me by return e-mail and delete/destroy it.
any update on this? thanks!
Support for npx has been added in v.10.3