Hello Netlify community, nice to meet you!
I want to deploy a react app that is doing an API call, using an API key stored in a secrets.json file. This file isn’t part of the public repository, so I created an environment variable in the Netlify UI to enable access to this information.
Unfortunately it’s not working and I assume I have to do additional set up in the build, so it can find the environment variable provided by Netlify…?
What I tried
I searched the community for answers but couldn’t fine one that made sense to me, as this is my first deploy to Netlify. For the sake of testing I uploaded a “blank” create-react-app, which is working fine: Blank React App
Therefore I think the only problem is the missing secrets.json, which is why it fails to compile.
11:05:53 AM: Creating an optimized production build…
11:05:56 AM: Failed to compile. <- was successful in the „blank“ project
11:05:56 AM: ./src/App.js
11:05:56 AM: Cannot find file ‘./secrets.json’ in ‘./src’.
Link to deploy
Mars Rover Picture Search
Any help would be greatly appreciated. Sorry if this problem has been discussed before but I couldn’t find an answer…