Open sangelici opened 4 years ago
Hi Sarah - The .env
file you use locally doesn't connect with your deployed heroku application. Instead, we use the configuration variables like how you set up the CLIENT_ORIGIN
.
So the main error is: MissingRequiredParameter: Missing required key 'Bucket' in params
From this line: const bucketName = process.env.BUCKET_NAME
Do you have a config variable called BUCKET_NAME
in your heroku settings? If not, try adding that and restarting your api.
Problem
Experiencing an error when I try to create a new listing on my deployed react app. In the console, I receive this error:
I have gone back to my API in the terminal and redid the heroku config command
heroku config:set CLIENT_ORIGIN="https://sangelici.github.io"
to ensure that is was set up correctly. I also reviewed both my MLAB and AWS set and have verified that they are also correct.The next step was to run heroku logs in the terminal and that is where I discovered another error
upon making a POST request, my api is unable to find the 'Bucket' param I should point out that the application works locally Also, my artwork-api does have the Bucket param with information stored in my .env file
Thoughts
My thinking is that maybe I did not connect the .env file properly to my api, but I'm also hesitant because it does run on the local server. Also, the keys in heroku are labeled as "ACCESS_KEY" and "SECRET_KEY", while the .env has them as "ACCESS_KEY_ID" and "SECRET_ACCESS_KEY". That may not be an issue, but I wanted to point it out. I have researched into the error and looked within the capstone issue queue, but have not found a solution. Will continue to research and will post an issue on the issue queue come Monday!