When I deploy locally, the app works fine. When I try to deploy on the IC, I get an error, which costs me valuable ICP. Help before I become bankrupt!!!
blahblah@DESKTOP-LD764BH:~/ic-projects/dkeeper$ dfx deploy --network ic --with-cycles 1000000000000
Deploying all canisters.
Creating canisters…
Creating canister “dkeeper”…
“dkeeper” canister created on network “ic” with canister id: “5zuok-kqaaa-aaaal-ab5lq-cai”
Creating canister “dkeeper_assets”…
“dkeeper_assets” canister created on network “ic” with canister id: “4u2ke-fyaaa-aaaal-ab5ma-cai”
Building canisters…
Building frontend…
Error: The post-build step failed for canister ‘4u2ke-fyaaa-aaaal-ab5ma-cai’ with an embedded error: The command ‘“npm” “run” “build”’ failed with exit status ‘exit status: 1’.
Stdout:
I looked it over and there are some parallels but I really don’t want to try everything on that post. I usually fall down a rabbit hole that is hard to get out of. I can deploy this project locally. Moreover, I’ve deployed other projects locally and on the IC. Only this project doesn’t go on the IC.
Maybe you can compare these projects that succeed with your project that does not work and find your issue?
Is you project configured to generate the did files with dfx generate?
What version of dfx is used in this project?
Sorry I cannot be really more precise because the issue finds place in your particular project. Not sure I will find time today but if your project is open source and provided with instructions, I can try to check it out and build it.
I’m using dfx 0.9.3. When I run “dfx generate”:
blah@DESKTOP-LD764BH:~/ic-projects/dkeeper$ dfx generate
Building canisters before generate for Motoko
Building frontend…
Generating type declarations for canister dkeeper_assets:
src/declarations/dkeeper_assets/dkeeper_assets.did.d.ts
src/declarations/dkeeper_assets/dkeeper_assets.did.js
src/declarations/dkeeper_assets/index.js
src/declarations/dkeeper_assets/dkeeper_assets.did
Generating type declarations for canister dkeeper:
src/declarations/dkeeper/dkeeper.did.d.ts
src/declarations/dkeeper/dkeeper.did.js
src/declarations/dkeeper/index.js
src/declarations/dkeeper/dkeeper.did
You can find my project here. The project allows a user to make notes and delete them. Good luck on building it!
I would like to stick with dfx 0.9.3. I tried upgrading before and everything got thrown off. So I went back to rebuilding the project as my instructor instructed.
I see, in that case I unfortunately can not really help more. I am using a newer version of dfx (note I’m not part that team, just using it as you do) and the generation of the declarations has changed which now uses dfx generate and which I think would solve the issue you are facing.