-
-
Notifications
You must be signed in to change notification settings - Fork 39
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
Error: 'bin' is not recognized as an internal or external command, operable program or batch file #127
Comments
Let me know if you guys want to fix this (as this is a Windows-only issue) and which solution you prefer |
Hey @jhuynh85 thanks for this! I wanted to let you know I've seen it, but I'm still thinking about the best solution. Part of me thinks we can ignore it, as it's a build task that should run before a deploy. Therefore not really necessary for local development, save for when people are working on this feature. If its just a matter of a separate build script for windows, maybe we can add another one and not add another dependency? Not sure yet, but that's my thinking so far. I'll get back to you, but feel free to give me your opinion as nothing is decided yet and I'm open to being convinced. |
I wasn't sure which environments were supported for development as it's not indicated in the project. I assumed Linux environment based on the postcss script, https://github.com/drewclem/protege/blob/master/package.json#L30, but maybe postcss internally handles For Windows this would work on WSL, but if you're not on WSL, it would 100% error out like you mention in the issue. I don't think it's a big deal to have WSL as a requirement, but that is probably another discussion.
For cross-env, from the times I've used it, seems to be only for setting environment variables. I don't think it can run a linux command as it defaults to Also, it's been quite a long time that I've used Windows for development, so I do not know how node handles filepaths if they are forward slashes in scripts on a Windows machine. |
This is no longer an issue at all since #228. |
STEPS TO REPRODUCE
npm start
RESULT
npm start
will fail with the error'bin' is not recognized as an internal or external command, operable program or batch file.
ADDITIONAL INFO
This error is due to
npm start
also running theget-contributors
script which is the commandbin/generate-contributors-json.js
. This is not recognized as a valid command in Windows.SOLUTION 1
Change the
get-contributors
script frombin/generate-contributors-json.js
tonode bin/generate-contributors-json.js
SOLUTION 2
Install the cross-env package which will allow the same npm scripts to be run on all platforms. This also has the benefit of avoiding potential issues with setting environment variables directly in npm scripts (which requires different syntax in Windows).
The text was updated successfully, but these errors were encountered: