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

not able to install Amplify CLI #13290

Closed
ZhengHuang-git opened this issue Oct 1, 2023 · 7 comments
Closed

not able to install Amplify CLI #13290

ZhengHuang-git opened this issue Oct 1, 2023 · 7 comments
Labels
installation Issues tied to installation of the CLI pending-response Issue is pending response from the issue author pending-triage Issue is pending triage question General question

Comments

@ZhengHuang-git
Copy link

Amplify CLI Version

Trying to install Amplify CLI

Question

Hello Everyone,

I am trying to install the Amplify CLI with the following command from the CloudShell.

curl -sL https://aws-amplify.github.io/amplify-cli/install-win -o install.cmd && install.cmd

But I got this this error -> " -bash: install.cmd: command not found "

Can anyone tell me what I am missing?

Thanks in advance,
Zheng

@ZhengHuang-git ZhengHuang-git added pending-triage Issue is pending triage question General question labels Oct 1, 2023
@ykethan
Copy link
Member

ykethan commented Oct 2, 2023

Hey @ZhengHuang-git, thank you for reaching out.
From the documentation, AWS cloudshell is a compute environment based on Amazon linux 2.
The command curl -sL https://aws-amplify.github.io/amplify-cli/install-win -o install.cmd && install.cmd is for windows.

you will have to use npm: npm install -g @aws-amplify/cli or curl command for mac or linux: curl -sL https://aws-amplify.github.io/amplify-cli/install | bash && $SHELL .

@ykethan ykethan added installation Issues tied to installation of the CLI pending-response Issue is pending response from the issue author labels Oct 2, 2023
@ZhengHuang-git
Copy link
Author

Hi @ykethan
I tried " npm install -g @aws-amplify/cli " but I got the following error. I logged in as the "root" user.

$ npm install -g @aws-amplify/cli 
npm ERR! code EACCES
npm ERR! syscall mkdir
npm ERR! path /usr/lib/node_modules/@aws-amplify
npm ERR! errno -13
npm ERR! Error: EACCES: permission denied, mkdir '/usr/lib/node_modules/@aws-amplify'
npm ERR!  [Error: EACCES: permission denied, mkdir '/usr/lib/node_modules/@aws-amplify'] {
npm ERR!   errno: -13,
npm ERR!   code: 'EACCES',
npm ERR!   syscall: 'mkdir',
npm ERR!   path: '/usr/lib/node_modules/@aws-amplify'
npm ERR! }

I also tried " curl -sL https://aws-amplify.github.io/amplify-cli/install | bash && $SHELL ". I saw the following error.

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

 Installing the AWS Amplify CLI...

 Downloading binary...
  % Total    % Received % Xferd  Average Speed   Time    Time     Time  Current
                                 Dload  Upload   Total   Spent    Left  Speed
  0     0    0     0    0     0      0      0 --:--:-- --:--:-- --:--:--     0
100  275M  100  275M    0     0   138M      0  0:00:01  0:00:01 --:--:-- 97.2M
 Download complete!
 Extracting binary...
tar: amplify-pkg-linux: Wrote only 6656 of 10240 bytes
tar: Exiting with failure status due to previous errors

Error: Amplify CLI failed to install. Check your internet connection and try again.
If this error still occurs, install the CLI using NPM: npm i -g @aws-amplify/cli

Do you have any other suggestions?

Thanks in advance,
Zheng

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

ykethan commented Oct 2, 2023

Hey @ZhengHuang-git, from the EACCES error message and the information here . It appears you will need to change npm's default directory to point to home directory.
Please refer to the following document providing this information.
https://docs.npmjs.com/resolving-eacces-permissions-errors-when-installing-packages-globally#manually-change-npms-default-directory
On using the steps I was able to install Amplify CLI without an error message.

Additionally, curious on the use case on using AWS CloudShell to install Amplify CLI. Could you provide us some additional information on this.
Furthermore noticed that CloudShell only provides 1 GB storage and may not be ideal if the use case requires more storage, as the storage cannot be increased.

@ykethan ykethan added the pending-response Issue is pending response from the issue author label Oct 2, 2023
@ZhengHuang-git
Copy link
Author

Hi @ykethan , I just started to learn AWS by following the AWS' online tutorial (https://aws.amazon.com/getting-started/hands-on/host-static-website/) which says to use Amplify in AWS console. It appears that AWS console is different from AWS CloudShell. Do you have any info on how to access AWS console?
Thanks!

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

ykethan commented Oct 4, 2023

Hey @ZhengHuang-git, sure no worries. The services such as AWS Cloudshell, AWS Amplify console are part of the AWS console. The tutorial guides you in hosting a static website on the AWS Amplify console.

  1. Login https://aws.amazon.com/console/
  2. in the search bar type in
    image
    From here the tutorial should guide you on the setup.

if you have any additional questions please do let us know.

@ykethan ykethan added the pending-response Issue is pending response from the issue author label Oct 4, 2023
@ykethan
Copy link
Member

ykethan commented Dec 8, 2023

Closing the issue due to inactivity.

@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.

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-response Issue is pending response from the issue author pending-triage Issue is pending triage question General question
Projects
None yet
Development

No branches or pull requests

2 participants