Zach Sweedler
Zach Sweedler

Reputation: 33

AWS Amplify CLI | "Command Not Found" after Successful Install via NPM/CURL

I'm trying to get my amplify backend connected to my Next JS application. I've globally installed Amplify CLI via NPM and via CURL. But, despite it showing as successfully installed, it doesn't recognize the "amplify" command. Note: I'm using Mac OS.

Commands Tried:

  1. npm install -g @aws-amplify/cli

  2. curl -sL https://aws-amplify.github.io/amplify-cli/install | bash && $SHELL

Both show succesful install results like below:

Successful Install

But...

Whenever I run "amplify" as a command or "amplify configure" it doesn't recognize it in the terminal. What could be the cause of this? What am I doing wrong?

Unrecognizable Command

One thing I’m noticing is it does not indicate in terminal that it’s configured within my $Path. If that’s the root cause of the issue, how come the CURL command I ran doesn’t add it to my zshrc file?

Thank you in advance!

Upvotes: 3

Views: 2416

Answers (1)

Sudhir Srinivasan
Sudhir Srinivasan

Reputation: 103

Most likely amplify was successfully installed in ~/.amplify/bin (where ~ is your home directory) but not added to path. To fix

  1. Check for successful installation ~/.amplify/bin
  2. Check $PATH to see if you see amplify directory (shouldnt be there)
  3. Add ~/.amplify/bin to your path to use it for e.g -> export PATH=$PATH:~/.amplify/bin

Upvotes: 3

Related Questions