-
Notifications
You must be signed in to change notification settings - Fork 38
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
"Environment variable not found for field" if build_runner hasn't been run without envied #59
Comments
yep, i got the same problem. |
Any update on this issue? the package is not working right now.
|
I have the same problem when adding new variables in my |
@atanasyordanov21 not this is not solution , and not workig. |
@petercinibulk please see this issue |
The issue is a known build_runner cache related issue, there are 2 fixes: this is a hammer:
more delicate:
|
Duplicate of #6 |
|
Good idea! Added in #77 |
import 'dart:io'; main() { print(current); Run this to get your root path, it will be much longer. I had to use this: |
Whenever I create a fresh clone of my project, which uses envied, when I run
flutter pub run build_runner build --delete-conflicting-outputs
I always get:The only way I can resolve the problem is to comment out my env.dart file, run
build_runner
(which succeeds), then restore my env.dart and runbuild_runner
again. Then the problem seems to fix itself. So basically, envied doesn't seem to work if you haven't run build_runner at least once without any envied code.I'm using Flutter 3.13.1. My variables are stored in a file called
.env
at the root of my project.Here's my env.dart:
And my
.env
:The text was updated successfully, but these errors were encountered: