Dfx deploy --network ic --no-wallet command reported error 404

root@anywn:~/motoko/workspace/wallet# dfx deploy --network ic --no-wallet
Deploying all canisters.
Creating canisters…
Creating canister “record”…
The replica returned an HTTP Error: Http Error: status 404 Not Found, content type “text/html”, content:

404 Not Found

404 Not Found


nginx/1.19.10

Is there some resolutions?

I get this error when I forgot to create a canister in nns app and link it with the canister I would like to deploy.

❯ dfx deploy --network=ic --no-wallet
Deploying all canisters.
Creating canisters…
Creating canister “deck”…
The replica returned an HTTP Error: Http Error: status 404 Not Found, content type “text/html”, content:

404 Not Found

404 Not Found


nginx/1.19.10

You can follow that tutorial to create and link canister with nns app: How to Deploy Your First Canister Smart Contract Using the NNS Dapp | by DFINITY | The Internet Computer Review | Medium

When the canister is created, you need to add the related id at the root of your project in a canister_ids.json file.

P.S.: I think you can also do it with the cmd line but never tried.