-
Notifications
You must be signed in to change notification settings - Fork 2.6k
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: bash and sh not available in $PATH #3767
Comments
hotfix: fix #3767, do not consider as a command if space and slash ar…
Thanks. Is working again. 👍 |
I'm getting this same error when I tried to run nginx as a pm2 service. This is my config file for nginx.
This is the error output:
|
I still have this error when running |
Hi IS there a fix for this , I have been encountering the same error for the past couple of days when I do a pm2 start ecosystem.config.js pm2 start ecosystem.config.js Error: bash and sh not available in $PATH |
This error appeared to me as well.
In Windows, avoid using spaces in the |
@fmalk Thanks for the inputs , I am able to start pm2 via ecosystem.config.js , I had one more question , Following is the content of my ecosystem.config.js file, I need to get the values stored in env and env_production in a variable in my component so that based on that I can hit the appropriate API. module.exports = { |
@snsarma not really an expert but isn't what you're trying to do achieavable by running
|
@fmalk Thanks for the response , when I run the above , I am not able to view my app in the browser and the environment variable isn't retrieved either.The pm2 gets started but the app is not up in my browser , I just need to figure a way to differentiate between development and production environment. Based on that the appropriate API is hit. Any inputs are welcome. |
hotfix: fix Unitech#3767, do not consider as a command if space and slash ar…
What's going wrong?
When I try to start my development environment using
pm2 start <configfile>
, pm2 exits with an error "bash and sh not available in $PATH". It's not really surprising to me since I'm working on Windows.How could we reproduce this issue?
Create a config file as follows:
{ apps: [{ "name": "mongo", "script": "C:\\Program Files\MongoDB\Server\3.6\\bin\\mongod.exe", "args": "--dbpath C:\\some\\db\\path" }] }
and start pm2 using
pm2 start <pathToThatConfigFile>
.Supporting information
pm2\lib\Common.js.verifyConf
looks for a space in thescript
property. If a space is found, it assumes that this script should be run in bash/sh.But a space could also appear in a binary/command path, on Windows, Mac OS and Linux. Either I don't know how to properly configure pm2 to run MongoDB (or any other non-node program) or it's a bug, I guess.
The text was updated successfully, but these errors were encountered: