Error 'str' object has no attribute 'get' after running aws cli command
Problem:
After you run a aws cli command, you get the error "'str' object has no attribute 'get'" after running aws cli command
$ aws iam list-users
'str' object has no attribute 'get'
Solution:
The command is failing because it requires a aws profile specified in the cli command. Can be found in your .aws/credentials file
$ aws iam list-users --profile my-profile
Mac AWS Amplify cli command is not found after npm install
Problem:
Install AWS Amplify on Mac fails using npm. amplify cli command is not found after npm install.
$ npm install -g @aws-amplify/cli
$ amplify
zsh: command not found: amplify
Solution:
Trying using cURL install instead for Mac or Linux
$ curl -sL https://aws-amplify.github.io/amplify-cli/install | bash && $SHELL
Reference:
You are running 'create-react-app' 4.0.3, which is behind the latest release (5.0.1) Error
Problem
npx has a cache with a reference
$ npx create-react-app my-app --template typescript
Need to install the following packages:
create-react-app
Ok to proceed? (y) y
You are running `create-react-app` 4.0.3, which is behind the latest release (5.0.1).
We no longer support global installation of Create React App.
Please remove any global installs with one of the following commands:
- npm uninstall -g create-react-app
- yarn global remove create-react-app
The latest instructions for creating a new app can be found here:
https://create-react-app.dev/docs/getting-started/
Solution
Clear the npx cache and try running again
$ npx clear-npx-cache
Need to install the following packages:
clear-npx-cache
Ok to proceed? (y) y
$ npx create-react-app my-app --template typescript