Closed RadiantUwU closed 3 years ago
Hi @RadiantUwU, are you using the pure JS version of the library or the experimental TS version on the typescript
branch?
If you're using the network.evolve
in the pure JS version then the problem most likely stems from using the async await
pattern since network.evolve
is not actually async (unfortunately, we're working on this in the new TS version)
@christianechevarria He is using the javascript version.
@RadiantUwU you have to use JSON.stringify before saving to file, and JSON.parse after loading file content.
Can you send your full code, as we can't see the initilization of the variable network
.
it was initialised tho :P
Yes, possible.
But it seems to me that the network variable is not defined the moment you call it.
So it would be good to have your complete code or even just the relevant code where you initialize the network and where you execute toJSON().
Maybe a network variable is defined, but it is not accessible at the moment you call toJSON().
im using stuff like im using network variable, but i didnt even globalize it