Search code examples
aws-amplifyaws-amplify-cli

AWS Amplify CLI commands give no return value at all unless run with sudo


After installing amplify with npm, any amplify command simply returns with no result. No error, no value. If run with sudo, I get a result.

After contacting AWS, I got the answer, so sharing it with anyone else who hits this below:


Solution

  • For me, this was due to permissions on the amplify directory. To fix it:

    sudo npm uninstall -g @aws-amplify/cli

    sudo rm -rf ~/.amplify/

    npm i -g @aws-amplify/cli

    I believe this removes the configs, so you may need to set up amplify again.