skip to Main Content

I am following the amplify tutorial provided by AWS. The npm install -g @aws-amplify/cli command is resulting in "failed to install amplify binary".

When I first did this I did not notice an error and continued through the tutorial until the: amplify init -y command.

Originaly the error I got for the above command was 'Failed to get profile: Cannot read property 'accessKeyId' of undefined'.

I then uninstalled and reinstalled npm install -g @aws-amplify/cli getting the same first error every time I have tried this "failed to install amplify binary" and continuing to the amplify init -y command I get Error: EPERM: operation not permitted, lstat 'C:Userscaleb.amplifybinamplify.exe'.

I am assuming that is because of the installation error. To try and troubleshoot the installation error I have done ‘npm cache clean --force and npm rebuild

I am not sure what else to try, my node version is v16.17.0 after updating from v16.14.0 hoping it would fix the issue.

Edit: After messing with this for hours I reset my computer and I can now npm install -g @aws-amplify/cli just fine but getting to amplify init -y command I still get the original error: 'Failed to get profile: Cannot read property 'accessKeyId' of undefined'.

2

Answers


  1. Chosen as BEST ANSWER

    Resetting my machine made the installation error "failed to install amplify binary" go away, and thus after going through amplify configure again the command amplify init -y works as expected. I tried this 7-8 times and updated, reinstalled etc nodejs many times which made no difference, I could not find any other search results for "failed to install amplify binary" so decided to post but resetting my machine magically fixed this.


  2. I found running amplify init and working through options manually allowed me to successfully initialize the project and continue on with the tutorial.

    Login or Signup to reply.
Please signup or login to give your own answer.
Back To Top
Search