MINGW-packages: `nodejs` - `npx` is a duplicate of `npm`
Description / Steps to reproduce the issue
The mingw64/bin/npx command thatโs part of the nodejs package is an exact duplicate of the mingw64/bin/npm command.
You can see from the source code of npm how they differ (our current npm version is 9.5.1):
https://github.com/npm/cli/blob/v9.5.1/bin/npm
https://github.com/npm/cli/blob/v9.5.1/bin/npx
Steps to reproduce (using react-native as an example):
- Install
nodejs:pacman -Sy mingw-w64-x86_64-nodejs - Run:
npx react-native@latest init AwesomeProject
Possibly related to this issue: https://github.com/msys2/MINGW-packages/issues/17497
Expected behavior
npm should download and execute the package react-native (with the arguments init AwesomeProject), thus creating a new react-native project in the current directory.
Actual behavior
"$NODE_EXE" "$NPM_CLI_JS" react-native@latest ... is executed instead of "$NODE_EXE" "$NPX_CLI_JS" react-native@latest ..., and so the following error occurs:
Unknown command: "react-native@latest"
To see a list of supported npm commands, run:
npm help
Verification
- I have verified that my MSYS2 is up-to-date before submitting the report (see https://www.msys2.org/docs/updating/)
Windows Version
MSYS_NT-10.0-19045
MINGW environments affected
- MINGW64
- MINGW32
- UCRT64
- CLANG64
- CLANG32
- CLANGARM64
Are you willing to submit a PR?
Yes
About this issue
- Original URL
- State: closed
- Created a year ago
- Comments: 32 (32 by maintainers)
share the updated patches if you want me to update the package
yup ๐
corepack also works now ๐ had to create a windows specific wrapper for it located in deps/bin instead of the shims in deps/corepack/shims.