I can't run a Conda command using exec
with my NodeJS app.
var conda_path = '~/miniconda3/bin/conda'
var cmd = conda_path + ' init bash & ' + conda_path + ' activate XYZ'
exec(command,
function(error, stdout, stderr){
}
);
I get the following error:
/bin/sh: /Users/username/Desktop/repos/project/XYZ: is a directory
CommandNotFoundError: Your shell has not been properly configured to use 'conda activate'. To initialize your shell, run
$ conda init <SHELL_NAME>
Currently supported shells are: - bash - fish - tcsh - xonsh - zsh - powershell
See 'conda init --help' for more information and options.
IMPORTANT: You may need to close and restart your shell after running 'conda init'.
I can find no related information online regarding running conda commands from NodeJS app.
How can I make this work?