Here is the code and the error message that I’m getting. The “Journal” actor class was successfully imported, but when I go to instantiate, I’m getting the following error.
Trying to install an instance of an actor class, but getting an error message. Anyone know what I'm doing wrong?
I can’t see the definition of
Journal in the screen shot, but judging from the error message, it looks as if it was a plain actor, not an actor class.
Ah, try removing the
canister: prefix from the import URI, or use
mo: (and replace the call to
Journal.Journal, since the imported file is treated as a module).
Explanation: If you use
canister:, you are not importing it as Motoko source, but as a compiled, foreign-language canister. It cannot be used as a Motoko actor class that way, only as a plain actor.
See also here and following section.