Dfx deploy locally with a new Dfx identity

Hello, i am new in IC Network, and i want to understand why I am not able to deploy locally a project if I set a new Internet Identity with Dfx identity new cmd with passphrase encryption. When I test to deploy the simple hello dapp I can deploy only if i use the default Dfx identity with no encryption or if i create one with --disable-encryption option, otherwise i am stuck at the dfx build phase like this :

$ dfx deploy
Please enter the passphrase for your identity: [hidden]
Decryption complete.
Creating a wallet canister on the local network.
The wallet canister on the “local” network for user “ic_yangshuei” is “rkp4c-7iaaa-aaaaa-aaaca-cai”
Deploying all canisters.
Creating canisters…
Creating canister hello_backend…
hello_backend canister created with canister id: rno2w-sqaaa-aaaaa-aaacq-cai
Creating canister hello_frontend…
hello_frontend canister created with canister id: renrk-eyaaa-aaaaa-aaada-cai
Building canisters…
Shrink WASM module size.
Building frontend…

No error message either so I wasn’t able to figure it out where is the issue.

The build step does not access your identity in any way, so would guess that the problem lies somewhere else. Since the frontend build hangs: Is there a chance you have a problem with node/npm? We generally recommend that you use Node version 16.

yea it’s really strange, I am using already Node 16, I try again with dfx start --clean to clean up and redeploy I still got the same issue and stuck at the building phase, however if I try to redeploy with a new identity without encryption it work fine.

I looked at the code once more, and there’s really no way for the identity to influence anything once Creating a wallet appears. Can you try nuking everything generated in the project?

dfx stop
rm -r .dfx
rm -r node_modules
# if Rust:
rm -r target

If this doesn’t work, my next attempt would be to try with a different version of dfx (or reinstalling).

well after nuking everthing, I even uninstall and reinstall a clean version of dfx (0.12.0) with the cmd line in the doc it still doesn’t work, I also think the issue is somewhere else.

Does your ‘everything’ include node as well? That would be my next try if you haven’t done that yet

if you mean the cmd line rm -r node_modules as you mention to remove node module directory yea it’s already done.

I meant brew remove node && brew install node or apt remove node && apt install node

Oh sry, yea I already reinstall node, I even try node 18 and 19 but still the same issue… but it’s not really a big deal for now as I can still work with it and play around, it’s just a weird issue that’s why I am asking, and sry for taking your time >.>

1 Like