running ‘dfx new hello’ displays only the info in the attached screenshot. Is this all it should show? In the tutorials it appears like there shoul be more. In addition, it stays there as if still working, until I press Ctrl+C.
No, this is not how it should work. A full output should look roughly like this:
❯ dfx new hello2
Fetching manifest https://sdk.dfinity.org/manifest.json
Creating new project "hello2"...
CREATE hello2/src/hello2_backend/main.mo (99B)...
CREATE hello2/src/hello2_frontend/assets/sample-asset.txt (24B)...
CREATE hello2/dfx.json (515B)...
CREATE hello2/.gitignore (202B)...
CREATE hello2/README.md (2.25KiB)...
CREATE hello2/src/hello2_frontend/src/index.js (553B)...
⠁ Installing node dependencies...
CREATE hello2/src/hello2_frontend/src/index.html (653B)...
CREATE hello2/src/hello2_frontend/assets/logo2.svg (14.78KiB)...
CREATE hello2/src/hello2_frontend/assets/main.css (537B)...
CREATE hello2/src/hello2_frontend/assets/favicon.ico (15.04KiB)...
CREATE hello2/package.json (1.17KiB)...
⠂ Installing node dependencies...
added 408 packages, and audited 409 packages in 12s
85 packages are looking for funding
run `npm fund` for details
Done.
Creating git repository...
===============================================================================
Welcome to the internet computer developer community!
You're using dfx 0.11.2
<logo removed>
To learn more before you start coding, see the documentation available online:
- Quick Start: https://internetcomputer.org/docs/current/developer-docs/quickstart/hello10mins/
- SDK Developer Tools: https://internetcomputer.org/docs/current/developer-docs/build/install-upgrade-remove/
- Motoko Language Guide: https://internetcomputer.org/docs/current/developer-docs/build/languages/motoko/
- Motoko Quick Reference: https://internetcomputer.org/docs/current/developer-docs/build/languages/motoko/language-manual
If you want to work on programs right away, try the following commands to get started:
cd hello2
dfx help
dfx new --help
===============================================================================
How long have you waited before killing the process? And could it be that your internet connection is spotty? There’s been some problems with that in the past. Otherwise, can you maybe also try dfx new hello --no-frontend
or dfx new hello --type rust
and report back if that works for you?
I waited quite long, gave it like 20 minutes to see if it does something.
With the --no-frontend options it proceeds more like what I expected.
If --no-frontend
works that hints at a problem with node, but I can’t be certain. The fact that it hangs in the other cases hints to me that something fails while unpacking an archive. Is there any chance you have whacky permissions, a ridiculously slow disk, or some other IO problems on your system?
If you don’t feel like debugging this too much, you can always clone this project: examples/motoko/hello-world at master · dfinity/examples · GitHub. It’s basically what dfx new
would produce.
Alright, thanks. I will clone this instead and check what the issue is later.
I switched Ubuntu to use wsl2 (from wsl1) and this sorted out the issue.
wsl --set-version Ubuntu 2
After running ‘dfx new hello’, then running ‘dfx deploy --network ic’, what would cause the error below?
Deploying all canisters.
All canisters have already been created.
Building canisters...
Building frontend...
Installing canisters...
Installing code for canister hello_backend, with canister ID 4il4p-swaaa-aaaai-acosa-cai
Error: Failed while trying to deploy canisters.
Caused by: Failed while trying to deploy canisters.
Failed while trying to install all canisters.
Failed to install wasm module to canister 'hello_backend'.
Failed to install wasm in canister '4il4p-swaaa-aaaai-acosa-cai'.
Failed to install wasm.
The replica returned an HTTP Error: Http Error: status 403 Forbidden, content type "application/cbor", content: Only controllers of canister 4il4p-swaaa-aaaai-acosa-cai can call ic00 method install_code
Error explanation:
Each canister has a set of controllers. Only those controllers have access to the canister's management functions (like install_code or stop_canister).
The principal you are using to call a management function is not part of the controllers.
Found the reason, I had some old ids for the canisters in the canister_ids.json. I deleted and they were re-added correctly and deployed successfully.