-
-
Notifications
You must be signed in to change notification settings - Fork 1.7k
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
Git style commands and different than module name bin command issue #714
Comments
I ran into this on Windows 7 as well, but my package.json looks like this: "main": "index.js",
"bin": {
"muir": "./index.js"
} and the error when running |
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
.command now supports the executableFile option (thanks to @abetomo). |
The cause is Commander is using the script from the command line (i.e. On Mac
On Windows
A slightly fragile but backwards compatible behaviour might be to look for both variations on Mac, so that |
PR to resolve this issue: #1571 |
Commander v9 has been released. |
I have the following setup:
NPM module name:
api-console-cli
Registered in package.json command:
api-console
and the following error when trying to run the program on Windows:
Under Linux and Mac it works when the sub-command file is located in
./bin/api-console-dev.js
. Windows throws an error which can be fixed by creating the./bin/api-console-cli-dev.js
. This file contains arequire
of the original file.Apparently on windows commander ignores that the actual CLI command is different than the npm module name. It should request one file only on all platforms.
You can find the source code here: https://github.com/mulesoft-labs/api-console-cli
The text was updated successfully, but these errors were encountered: