Resolving 'dynamically imported module evaluation pending, but no pending ops'
I've been getting this error quite a lot, but I haven't found a single way to know which unresolved promises cause it.
Any tips on what to do to find the cause of these cases?
35 Replies
Unknown User•3y ago
Message Not Public
Sign In & Join Server To View
It is worth noting the topmost contents of
dummy.ts
as well:
assuming that "../../trollegle.ts"
is the entry fileUnknown User•3y ago
Message Not Public
Sign In & Join Server To View
8 | import { Dummy } from "./lib/sources/dummy.ts";
It imports it directlyUnknown User•3y ago
Message Not Public
Sign In & Join Server To View
Although then, weird how everything else that imports anything from
[entryfile]
doesnt come up with the issueUnknown User•3y ago
Message Not Public
Sign In & Join Server To View
dummy.ts among other files regarding various initializers go before
CATEGORY.ts
Maybe it's not possible to import from a file that directly imports said fileUnknown User•3y ago
Message Not Public
Sign In & Join Server To View
Nope, I'd argue it might even be the last one
Unknown User•3y ago
Message Not Public
Sign In & Join Server To View
What's considered a "circular dependency"
Unknown User•3y ago
Message Not Public
Sign In & Join Server To View
That's why I wanted to ask, because I already do something similar (excluding
CATEGORY.ts
) which does not produce the error
Okay, what about this:Unknown User•3y ago
Message Not Public
Sign In & Join Server To View
Okay that may be useful
Unknown User•3y ago
Message Not Public
Sign In & Join Server To View
Right, but how would I do the following:
have an entry file declare some useful things, such as class initializations
having the entry file import (execute) other files which require importing of those useful things from the entry file
Also, since these are dynamic imports, can't use
deno info
Okay, turns out it was because I was importing from the entry file while it had a top-level await
operation hangingUnknown User•3y ago
Message Not Public
Sign In & Join Server To View
actually its just the "await completion of method
init
of Trollegle<TrollegleSources>
"Unknown User•3y ago
Message Not Public
Sign In & Join Server To View
yeah
Unknown User•3y ago
Message Not Public
Sign In & Join Server To View
its basically "wait for the initializer to complete initializing a thing which initializes a thing that initializes another thing which imports the entry file"
"which is waiting for the initializer to complete <ref *1>"
Unknown User•3y ago
Message Not Public
Sign In & Join Server To View
very uninformative error though
also thank you, yes, i forgot to say that
Unknown User•3y ago
Message Not Public
Sign In & Join Server To View
it would be better if it were just like
like whatever the issue is, but too bad im not a deno developer
Unknown User•3y ago
Message Not Public
Sign In & Join Server To View
^
Unknown User•3y ago
Message Not Public
Sign In & Join Server To View
i doubt they'd just put a dumb error with 0 verbosity if they could make it include some information
Unknown User•3y ago
Message Not Public
Sign In & Join Server To View
you are somewhat familiar with rust? thats neat
anyways, thanks for helping out
Unknown User•3y ago
Message Not Public
Sign In & Join Server To View