Skip to content
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

Amplify commands not found despite installation #13458

Closed
2 tasks done
NoellaMarie501 opened this issue Dec 7, 2023 · 7 comments
Closed
2 tasks done

Amplify commands not found despite installation #13458

NoellaMarie501 opened this issue Dec 7, 2023 · 7 comments
Labels
installation Issues tied to installation of the CLI pending-triage Issue is pending triage

Comments

@NoellaMarie501
Copy link

How did you install the Amplify CLI?

npm

If applicable, what version of Node.js are you using?

21.4.0

Amplify CLI Version

not know can not run any amplify command

What operating system are you using?

Ubuntu and Windows

Did you make any manual changes to the cloud resources managed by Amplify? Please describe the changes made.

No manual changes mad

Describe the bug

I installed aws-amplify/cli with the command npm install -g @aws-amplify/cli both on ubuntu and windows systems and the package was successfully added but i am unable to use any amplify command. I followed soo many debugging steps including checking the PATH on ubuntu and checking the symbolic link but it did not still help.

Expected behavior

Amplify commands should execute as expected

Reproduction steps

  1. install amplify globally with npm : npm install -g @aws-amplify/cli
  2. create a folder for project
  3. navigate to project to run amplify commands : amplify configure or amplify init

Project Identifier

No response

Log output

# Put your logs below this line
sudo: amplify: command not found

Additional information

No response

Before submitting, please confirm:

  • I have done my best to include a minimal, self-contained set of instructions for consistently reproducing the issue.
  • I have removed any sensitive information from my code snippets and submission.
@NoellaMarie501 NoellaMarie501 added the pending-triage Issue is pending triage label Dec 7, 2023
@ykethan
Copy link
Member

ykethan commented Dec 7, 2023

Hey @NoellaMarie501, thank you for reaching out. In you working PC could you check the ~/.amplify/logs/ or C:\Users\<username>\.amplify\logs folders with the latest timestamp, do you observe any errors or logs?
Additionally, could you try running the CLI commands with the --debug flag.

@ykethan ykethan added installation Issues tied to installation of the CLI pending-response Issue is pending response from the issue author labels Dec 7, 2023
@NoellaMarie501
Copy link
Author

Hello @ykethan thank you for responding, with regards to checking the log file there are no errors or logs this is the only content of the file 2023-12-06T14:07:24.734Z|info : amplify version core . About running the commands with the --debug flag i'm unable to run the commands because it says `amplify command not found

@github-actions github-actions bot removed the pending-response Issue is pending response from the issue author label Dec 8, 2023
@ykethan
Copy link
Member

ykethan commented Dec 8, 2023

@NoellaMarie501 thank you for the information. Do you observe a similar behaviour if you install Amplify CLI using the curl commands here

Was node/npm/amplify installed with sudo by any chance? Can you check the permissions on ~/.amplify and see if root owns this directory? we could run ls -al ~/.amplify to check the permission. we may need to run sudo chown -R $(whoami):$(id -gn) ~/.amplify to mitigate the issue.

Are you able to run the binary directly with ~/.amplify/bin/amplify?

@ykethan ykethan added the pending-response Issue is pending response from the issue author label Dec 8, 2023
@NoellaMarie501
Copy link
Author

@ykethan Thank you. I installed it globally with the -g flag same as node and npm, so did not use sudo. I Previously uninstalled and installed several times again to check if the installation was the problem, but it did not help. I just tried uninstalling again and installing and for some reason the amplify command now runs

@github-actions github-actions bot removed the pending-response Issue is pending response from the issue author label Dec 8, 2023
@ykethan
Copy link
Member

ykethan commented Dec 8, 2023

@NoellaMarie501 interesting, glad to hear the commands are now working. if the issue reappears do reach out to us and we would be happy in diving deeper. Closing the issue.

@ykethan ykethan closed this as not planned Won't fix, can't repro, duplicate, stale Dec 8, 2023
Copy link

github-actions bot commented Dec 8, 2023

⚠️COMMENT VISIBILITY WARNING⚠️

Comments on closed issues are hard for our team to see.
If you need more assistance, please open a new issue that references this one.
If you wish to keep having a conversation with other community members under this issue feel free to do so.

@relaycamp
Copy link

hi everyone,.

I am having the same problem.

I installed amplify cli on my new M2 Macbook Air and when I run amplify configure, the command immediately exits.

volta: 1.1.1
amplify cli: Latest version (not able to check because the command terminates)
amplify location: /Users/{myusername}/.volta/bin/amplify

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
installation Issues tied to installation of the CLI pending-triage Issue is pending triage
Projects
None yet
Development

No branches or pull requests

3 participants