amplify-cli
amplify-cli copied to clipboard
CLI V.8 is not working under M1
Before opening, please confirm:
- [X] I have installed the latest version of the Amplify CLI (see above), and confirmed that the issue still persists.
- [X] I have searched for duplicate or closed issues.
- [X] I have read the guide for submitting bug reports.
- [X] I have done my best to include a minimal, self-contained set of instructions for consistently reproducing the issue.
- [X] I have removed any sensitive information from my code snippets and submission.
How did you install the Amplify CLI?
npm install -g @aws-amplify/cli
If applicable, what version of Node.js are you using?
v17.8.0
Amplify CLI Version
@newest
What operating system are you using?
macOS
Did you make any manual changes to the cloud resources managed by Amplify? Please describe the changes made.
Nope
Amplify Categories
Not applicable
Amplify Commands
Not applicable
Describe the bug
When I install the newest cli, the cli is VOID. amplify --v is not return any text. all other amplify commands too.
Expected behavior
.. do something.
Reproduction steps
reInstalled macOS today and installed the cli
GraphQL schema(s)
# Put schemas below this line
Log output
# Put your logs below this line
Additional information
No response
Hey @biller-aivy :wave: thanks for raising this! Unfortunately I am not able to reproduce on my M1 mac using Node versions 14, 16, and 17. How was Node and npm installed?
@josefaidt after I pulled my amplify app, and updated it to v8 it is working. Installed over Homebrew
Thanks for clarifying @biller-aivy ! To clarify, is this working now? What sort of issues were you seeing prior to fixing the issue?
@biller-aivy I'm also facing the same issue that there is no output on executing any amplify cli command, can you share how did you resolve this? Otherwise I feel like I'll have open a new issue.
i installed the v7 and pulled my project, after that, I installed v8
i installed the v7 and pulled my project, after that, I installed v8
downgrading to 7.6.26 fixed the issue for me as well.
Hey @saif003 and @biller-aivy would y'all mind sharing a screenshot of the install and first command execution? Unfortunately I have not been able to reproduce this issue on my end using an M1 mac
@josefaidt here you go,

and when I install using following command then amplify runs as expected.
npm install -g @aws-amplify/cli@7 --force

I'm using node 16.1.0, and I've installed node using asdf using following commands,
asdf plugin add nodejs
asdf install nodejs 16.1.0
asdf global nodejs 16.1.0
I've also tried with latest version of node directly without asdf but was still getting the same issue.
Hey @saif003 thank you for those screenshots, and while I initially tested on Node 16.14.1/2 I downgraded to 16.1.0 to no avail

Can you post a snippet from your logs at ~/.amplify/logs at the time this occurs?
Hey @biller-aivy :wave: just wanted to follow-up on my previous message and see if you are able to capture logs at the time this occurs?
Starting with Amplify v8 on OSX (M1), using the amplify upgrade command seems to be the culprit. After the upgrade, any amplify command, even "amplify -v" produces no output. I have to completely remove the package "npm remove .." and then "npm install ..." to restore normal operations.
Hey @bc4253 did you install the CLI initially using sudo by chance? After executing amplify upgrade the first command does take an excessive amount of time to respond but it should print something
Hey @biller-aivy and @bc4253 just wanted to follow-up here and see if you are still experiencing this issue?
Chip: Apple M1 Pro
% node -v
v18.2.0
% npm -v
8.9.0
% curl -sL https://aws-amplify.github.io/amplify-cli/install | bash && $SHELL
...
bash: line 111: /Users/<home folder>/.amplify/bin/amplify: Bad CPU type in executable
% npm i -g @aws-amplify/cli
added 26 packages, and audited 27 packages in 36s
% amplify # return nothing
% which amplify
/Users/<home folder>/.amplify/bin/amplify
% /Users/<home folder>/.amplify/bin/amplify
zsh: bad CPU type in executable: /Users/<home folder>/.amplify/bin/amplify
v7 seems like working
% npm install -g @aws-amplify/cli@7 --force
% amplify -v
7.6.26
Hey @crzyjcky can you paste the output of running arch and try installing Rosetta with softwareupdate --install-rosetta to see if this mitigates the issue?
hi @josefaidt, after installing softwareupdate --install-rosetta, amplify-cli v8 works. Thanks.
% arch
arm64
% amplify -version
8.2.0
Hey @crzyjcky I'm glad to hear that worked well! I'll mark this as a documentation issue to add this callout to our installation docs!
I am also on OSX M1 and just ran into the no output on cli v8 issue while setting up a new machine. Downgrading to v7 worked well. It feels like requiring a rosetta install to work with a newer version of cli is a step backwards. Hoping whatever dependency in v8 that seems to require rosetta can be eliminated or updated to support m1 natively.
I am still having issues. I originally installed some v8 version a few weeks back and all was fine until there was an upgrade. After running amplify upgrade, then amplify
@bc4253 - did you try the step in this message above: https://github.com/aws-amplify/amplify-cli/issues/10193#issuecomment-1132433956 ? Does that fix for you?
@bc4253 - did you try the step in this message above: #10193 (comment) ? Does that fix for you?
It does not, I already have rosetta installed. the arch command returns arm64
Same problem found on NixOS 22.05, had to downgrade to make it work !
I'm on M1, installing Rosetta worked for me. Thank you @josefaidt
The M1, arm64, is not supported.
After several different installs attempts, the amplify binary every time it generates x86.
# file ~/.amplify/bin/amplify
~/.amplify/bin/amplify: Mach-O 64-bit executable x86_64
If you look at at the supported platform in the binary.ts you can see the Mac arm64 package is pointed to the x64 version.
{
TYPE: 'Darwin',
ARCHITECTURE: 'arm64',
COMPRESSED_BINARY_PATH: 'amplify-pkg-macos-x64.tgz',
},
Here is the workaround I used to get cli v9 working on Mac arm64 with Rosetta. Build from source. The Max node supported version is v16.
git clone https://github.com/aws-amplify/amplify-cli.git
cd amplify-cli
nvm use 16
yarn install
yarn run build
You get a working amplify.
# ./node_modules/.bin/amplify --version
9.1.0
Hey @bc4253 did you install the CLI initially using
sudoby chance? After executingamplify upgradethe first command does take an excessive amount of time to respond but it should print something
Amplify CLI 10.0.0, Node 16.14.0, M1 Mac
I ran sudo amplify upgrade
If I run sudo before status, --help, --version, etc. it works. Id' like for this not to be the case, should I open a new issue?
hi @josefaidt, after installing
softwareupdate --install-rosetta, amplify-cli v8 works. Thanks.% arch arm64 % amplify -version 8.2.0
This worked for me as well on M2 chip
hi @josefaidt, after installing
softwareupdate --install-rosetta, amplify-cli v8 works. Thanks.% arch arm64 % amplify -version 8.2.0
This does not work for me on an M1 MacBook Air. The only solution is to download v7, however then my configure command hangs. I have seen a few past issue reports of this, but they were all on Windows.
% amplify -v
7.6.26
% amplify configure
? Select the backend providers. (Press <space> to select, <a> to toggle all, <i> to invert selection)
No other output or backend providers shown.
I did install with “sudo npm install -g @aws-amplify/cli” and then upgraded with “sudo amplify upgrade”. After the upgrade finishes, then any amplify command, even just “amplify -v”, immediately returns and produces no output.
My environment is Apple silicon MacBook Pro.
Brian Chojnowski Senior Consultant AT&T Consulting
AT&T Integrated Solutions & Consulting 930 National Parkway, Schaumburg, IL 60173 m 630.484.6422 o 630.484.6422 | @.@.>
From: josef @.> Sent: Wednesday, May 4, 2022 3:55 PM To: aws-amplify/amplify-cli @.> Cc: CHOJNOWSKI, BRIAN @.>; Mention @.> Subject: Re: [aws-amplify/amplify-cli] CLI V.8 is not working under M1 (Issue #10193)
Hey @bc4253https://urldefense.com/v3/__https:/github.com/bc4253__;!!BhdT!mohOrNGpfj9HknqM_Z2stFbHoHb-4hS6s6-DI1WMMMbkOXtdLcSsfq516iJ8DAk_1tv6-q_xNkDu7KxSUs-_wok$ did you install the CLI initially using sudo by chance? After executing amplify upgrade the first command does take an excessive amount of time to respond but it should print something
— Reply to this email directly, view it on GitHubhttps://urldefense.com/v3/__https:/github.com/aws-amplify/amplify-cli/issues/10193*issuecomment-1117929809__;Iw!!BhdT!mohOrNGpfj9HknqM_Z2stFbHoHb-4hS6s6-DI1WMMMbkOXtdLcSsfq516iJ8DAk_1tv6-q_xNkDu7KxSnWgY-6A$, or unsubscribehttps://urldefense.com/v3/__https:/github.com/notifications/unsubscribe-auth/APG3K5YSIPVQUZSN7O2CT3DVILPYXANCNFSM5TGAC6NA__;!!BhdT!mohOrNGpfj9HknqM_Z2stFbHoHb-4hS6s6-DI1WMMMbkOXtdLcSsfq516iJ8DAk_1tv6-q_xNkDu7KxSyXbQuG0$. You are receiving this because you were mentioned.Message ID: @.@.>>
I was able to get it working by downloading amplify-pkg-macos.tgz file from releases.
I deleted the binary at /usr/local/bin/amplify, renamed the binary inside the package that I downloaded, and moved it to the location where the old deleted binary was. I noticed that I also needed to do sudo chown -R $(whoami) ~/.amplify. It seems after running amplify, I have another binary in my ~/.amplify directory.
Not sure why installing it via NPM was not working. I had no errors, just a dead binary with no output.
I am running on a 2021 Macbook Pro 16" M1 Max, with Node 16.12.0, Amplify 10.3.1, and macOS Monterey 12.6.