Hello everyone,
I try to achieve the Quick Start in local development but there are some errors which I don’t understand.
I had launch dfx start which is running on one window. On another I tap dfx deploy but at the middle of process I have this message :
" The post-build step failed for canister ‘ryjl3-tyaaa-aaaaa-aaaba-cai’ with an embedded error: The command ‘“npm” “run” “build”’ failed with exit status ‘exit code: 1’.
Stdout:
hello_assets@0.1.0 build
webpack
"
I have npm, but apparently my console doesn’t know “run” and “build”…
Furthermore, when I try dfx canister call hello greet everyone I have :
"The Replica returned an error: code 3, message: “Attempt to execute a message on canister rrkah-fqaaa-aaaaa-aaaaq-cai which contains no Wasm module”.
I have download wasm3 with brew install and error persist.
I haven’t find answer on this forum so I put here, but if this topic is already solved I can erase
Is it normal dfx start --clean has launch :
"May 15 17:46:49.281 INFO ic-starter. Configuration: ValidatedConfig … May 15 17:46:51.666 WARN s:fscpm-uiaaa-aaaaa-aaaap-yai/n:wllx2-nstc6-mnfju-dii5p-fjosw-bautj-sqrnt-yfbje-aoqbd-l3ux2-wqe/ic_http_handler/ic_http_handler NNS subnet not found in network topology. Skipping fetching the delegation.
I remove all folders, I have done each tips to download all again and I have always this after dfx start in a window and dfx deploy in another :
result of dfx deploy
"dfx deploy
Deploying all canisters.
Creating canisters…
Creating canister “hello”…
Creating the canister using the wallet canister…
Creating a wallet canister on the local network.
The wallet canister on the “local” network for user “default” is “rwlgt-iiaaa-aaaaa-aaaaa-cai”
“hello” canister created with canister id: “rrkah-fqaaa-aaaaa-aaaaq-cai”
Creating canister “hello_assets”…
Creating the canister using the wallet canister…
“hello_assets” canister created with canister id: “ryjl3-tyaaa-aaaaa-aaaba-cai”
Building canisters…
Building frontend…
The post-build step failed for canister ‘ryjl3-tyaaa-aaaaa-aaaba-cai’ with an embedded error: The command ‘“npm” “run” “build”’ failed with exit status ‘exit code: 1’.
Stdout:
TypeError: Cannot read property ‘javascript’ of undefined
at /Users/galoisfield/ic-project/hello/node_modules/terser-webpack-plugin/dist/index.js:607:38
at SyncHook.eval [as call] (eval at create…
at Object. (/Users/galoisfield/ic-project/hello/node_modules/webpack-cli/bin/cli.js:366:3)
at Module._compile (node:internal/modules/cjs/loader:1109:14)".
I don’t understand the error message and I try all recommendations.
But thank you very much for your comment, maybe I will find something randomly
The npm run build step is just running the command “webpack” which is what’s failing (as your posts above show). This is only used in the frontend part of the project.
(“build” is a script entry in your project’s package.json file if you want to look).
It might be worth trying another version of npm and node to see if this fixes it, something does appear to be incompatible there.
You could use nvm to manage node versions more easily.