0
votes

I am unable to run certain (macos) terminal commands after switching back to bash from temporarily using zsh. One of the commands is 'amplify publish' which returns the following error:

bash: amplify: command not found

I have installed the amplify cli globally using: npm install -g @aws-amplify/cli

echo $PATH returns /usr/bin:/bin:/usr/sbin:/sbin:/usr/local/bin

and the contents of my .bashrc file is as follows:

export PATH=/usr/bin:/bin:/usr/sbin:/sbin:/usr/local/bin

export EDITOR="code --wait"

Amplify is not the only command that is suddenly missing, but this is the most pressing.

Thanks in advance for your help!

1
Run npm root -g to see where global packages are installed. - chepner
Or check your zsh configuration to see which directory it added to PATH that your bash configuration does not. - chepner
@chepner that command returns: /Users/john/.npm-packages/lib/node_modules. also i couldnt get amplify to work on zsh either, which is why i reverted back to using bash. - dev_dy
Does /Users/john/.npm-packages/bin exist? - chepner
@chepner it does exist! - dev_dy

1 Answers

0
votes

appending that path to the globally installed npm package folder to the current PATH variable solved my issue!