Project Installation

Step 1

First thing make sure that your machine is running

  • node version 16.20.2 , from https://nodejs.org/en/download or download nvm to have multiple node version
  • amplify version 10.5.2 , you can run this command to get amplify globally npm install -g @aws-amplify/cli@10.5.2 --no-save
Small note: If you decide to go with the nvm approach make sure to choose the node version from Powershell and run it as an administrator as git bash is not configured to do that

check your version using

amplify --version //10.5.2 
node -v //16.20.2 

If you uninstalled @aws-amplify/cli make sure that files on ~/.aws ~/.amplify and ~/.config is deleted.

Step 2

clone transloads repo

git config --global user.name "Adam K"
git config --global user.email "username@transloads.co"
git clone -b dev https://adamk-transloads:ghp_personal_token@github.com/adamk-transloads/transloads-co.git
git clone -b hotfix https://github.com/adamk-transloads/transloads-co.git transloads-co-HOTFIX
git clone -b main https://github.com/adamk-transloads/transloads-co.git transloads-co-PROD

Or, You can use GitHub desktop ,Clone it.

Make sure your branch is dev , switch to it by git checkout dev

Step 3

After making sure that you are running with these versions, Make sure you are using command line.

run amplify init
add your credentials ( the secrete – access keys )

check that you are in the right environment with is dev by running amplify env list ,But you will not find it running

Step 4

if you need to define aws_profile
unix
> export AWS_PROFILE=default
Windows
> setx AWS_PROFILE default

run amplify configure

it will redirect you to the login page in AWS Amplify
log in and it will ask you to add the secrete and access keys,If it ask you to create new Iam user ,Do not create it ,Just cancel amazon website and enter on cmd and add your credentials.

Step 5

make sure that files in ~/.aws

~/.aws/credentials
    [default]
    aws_access_key_id=AKIAIOS______EXAMPLE
    aws_secret_access_key=wJalrXUtnFEMI/K7MDEN__________EXAMPLE_KEY

~/.aws/config
    [default]
    region=us-east-1
    output=json

run amplify pull --appId d3jq0bgwpjtg7n --envName dev 
you should get a list of all the things that need to get merged into your project from AWS
press yes to merge

check that you are in the right environment with is dev by running amplify env list ,Now it is running.

Then amplify pull to pull the backend.

Step 6


run npm install to install all your dependencies

after that make sure you are running Powershell and also make sure that you’re on the right dir (project dir) and run this command

copy /Y react-admin-patch-build\* node_modules\react-admin-amplify\build
npx patch-package react-admin-amplify

Step 7 

after doing all of these steps you should be ready to go 🎉
npm run start 

Related Content