Command not found
Describe the bug A clear and concise description of what the bug is.
bash: amplify: command not found To Reproduce Steps to reproduce the behavior:
- npm install -g @aws-amplify/cl
- amplify configure
- See error - bash: amplify: command not found
Expected behavior A clear and concise description of what you expected to happen. Expected to configure
Screenshots If applicable, add screenshots to help explain your problem.
Desktop (please complete the following information):
- OS: [e.g. iOS]
- Browser [e.g. chrome, safari]
- Version [e.g. 22]
Mac - Monterey Smartphone (please complete the following information):
- Device: [e.g. iPhone6]
- OS: [e.g. iOS8.1]
- Browser [e.g. stock browser, safari]
- Version [e.g. 22]
Additional context Add any other context about the problem here. command input: amplify configure
command output: bash: amplify: command not found
node version v16.14.2 Installed using npm
Hey @RFason :wave: based on the provided information it appears the global npm bin directory is not in your PATH. To confirm, we can run npm bin -g, which will print the message (not in PATH env variable) if it is not available in your PATH.
We can then modify our ~/.bashrc file to include the global npm bin directory, and either restart our terminal or run source ~/.bashrc
PATH="$PATH:$(npm bin -g)"
it returns nothing. It does not return that message mentioned above
Thanks for the clarification @RFason how was Node & NPM installed? Can you confirm whether echo $PATH | grep $(npm bin -g) returns anything?
-
It was install via Node website -nodejs.org/en/download and NPM - npm install -g npm
-
It returns - /usr/local/bin:/usr/bin:/bin:/usr/sbin:/sbin:/usr/local/bin:/usr/local/bin
Hey @RFason thanks for clarifying. Moving forward I would make sure:
- Node and NPM are installed
npm bin -gis a part of ourPATHenvironment variable- after
@aws-amplify/amplify-cliis installed withnpm i -g @aws-amplify/cli, we can confirm the binary is available withwhich amplify
For reference, we can alternatively use a Node version manager like nvm, more info can be found on the npm docs
We can also set a custom npm prefix
With that I will close this issue for now, however if needed we can re-open to investigate further. Please use the NPM docs as a point of reference for troubleshooting globally installed packages and binaries not available
npm ERR! code E404 npm ERR! 404 Not Found - GET https://registry.npmjs.org/@aws-amplify%2famplify-cli - Not found npm ERR! 404 npm ERR! 404 '@aws-amplify/amplify-cli@*' is not in this registry. npm ERR! 404 You should bug the author to publish it (or use the name yourself!) npm ERR! 404 npm ERR! 404 Note that you can also install from a npm ERR! 404 tarball, folder, http url, or git url.
I'm now getting this error when installing.
Thanks for all your help Josef! I am closing this due to an internal issue that needs to be reviewed. I really appreciate your help getting to the root cause of this issue.