dfinity / linkedup

An open professional network.
https://sdk.dfinity.org
Apache License 2.0
154 stars 43 forks source link

Couldn't build using dfx 0.6.18 #54

Closed rbolog closed 2 years ago

rbolog commented 3 years ago

Hi, I am trying to compile linkedup for learning purpose. I got the error bellow using dfx build

Note: I modify dfx.json version from 0.6.6 to 0.6.18

Stderr: /var/opt/dev/linkedup/src/connectd/main.mo:6.1-19.2: type error, an actor or actor class must be the only non-imported declaration in a program (This is a limitation of the current version.) My problem is my experience with Motoko isn't good enough to find a work around.

Thanks

Abderahman88 commented 3 years ago

Hi @rbolog

Types need to be inside the actor (see screenshot)

dfxNew

A PR already addresses this issue, but still needs to be merged to master.