(solved) "Compiler not defined" testing sdk example

Hi all,
I’m following this example - https://github.com/aeternity/aepp-sdk-js/blob/develop/docs/examples/node/aecontract.md

and I’m calling exec() with my contract file location, along with a function and arguments.

I have a working node.

When running aeproject compile in the project folder it works. But when I run the sdk file with the exec() function, it gives me a Compiler not defined error…

Have a look at my code if you’d like - https://github.com/arthas168/Hash-Time-Lock/blob/master/main.js

Any help would be greatly appreciated

Hello @arthas168,

Nice to meet, this doc is a little bit outdated.
Here you can find an PR with update.
You just simply need to pass additional param to SDK which is compilerUrl.


1 Like

Thank you very much, it worked

1 Like

But now I get



Make sure that your node is running on localhost:3013.
Or use public one by passing Ae({ url: 'NODE_URL', ... })

How can I check if it’s running on that port? :s

How do you run your node?

1 Like

First I run sudo dockerd in the directory, then sudo aeproject node (I had problems running them without root privileges)

@nduchak.chain have you thought of something that might help? :frowning:

lets keep the discussion for this in the new thread you opened

1 Like