.env file mentioned in pubspec.yaml cannot be found #1892
Replies: 2 comments
-
Hello @SpaceBuckett, if you want to use an .env file to store your credentials, you need to publish this file somewhere secure, like in an S3 or GCP bucket. Then, you can load this file to read the values inside. Check out this guide for more information. But you can also create .env file during the build process and write values to it from environment variables generated in the UI. Check this guide More info about environment variables. |
Beta Was this translation helpful? Give feedback.
-
This discussion is being closed due to no activity in the last 14 days. You can reopen the discussion at any time if needed. |
Beta Was this translation helpful? Give feedback.
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
-
If you are looking for help, please confirm the following...
Which mobile framework are you using?
Flutter (Dart)
Steps to reproduce
When generating build for the flutter app, I am getting an error,
.env
file mentioned inpubspec.yaml
cannot be found..env
file contains the api keys for my app, and I have not added this file into my GitHub repo, therefore code magic isn't able to get this file. Can anyone help me by telling how can I add the.env
file of my app into the code magic?Expected results
A build should be generated by the code magic once I add the .env file.
Actual results
Currently, the build generation fails as I don't know how to add the .env file of my app into the code magic.
Build id (optional)
No response
Beta Was this translation helpful? Give feedback.
All reactions