I’m a new developer struggling with dfx. This is one of the problems I’m running into when doing “Hakin’ on The Internet Computer ep.1.” I’m using a linux machine and it should already have all the recommended packages installed.
Here’s the command line process and where I get stuck:
dfx new phonebook
-The canister files were never made and errors with dfx build lead me to this
dfx canister create phonebook_assets
dfx canister create phonebook
dfx canister install phonebook
dfx canister install --all
-The Replica returned an error: code 5, message: “Canister X cannot be installed because the canister is not empty. Try installing with mode=‘reinstall’ instead.”
Why does this happen, will this repeat with every change to the main.mo file, and how do I fix it?
By the way, the canister does work when I call it;
dfx canister call phonebook greet world
But I can’t get any updates to the code to take.
Any help much appreciated.