Dfx generate : Failed to create AgentEnvironment for network 'local'

i’m trying to run dfx generate for one of my canisters. however today i start seeing this error

Error: Failed to create AgentEnvironment for network 'local'.
Caused by: Failed to parse contents of /Users/freddie/Library/Application Support/org.dfinity.dfx/network/local/replica-effective-config.json as json
Caused by: missing field `use_old_metering` at line 30 column 1

i did recently install didc so im not sure if that is the cause but its hard to say for sure because i haven’t tried to run dfx generate for over a month now.

OS: MacOS
dfx 0.22.0

I just deleted the json file and it resolved itself

1 Like