auth-client-demo icon indicating copy to clipboard operation
auth-client-demo copied to clipboard

Failed to assert source paths.: Unable to determine canonical location of asset source path /Users/black/icp/auth-client-demo/dist/auth_client_demo_assets/: No such file or directory (os error 2)

Open troublesprouter opened this issue 2 years ago • 2 comments

I'm getting this error on running dfx deploy

dfx deploy    

Deploying all canisters.
All canisters have already been created.
Building canisters...
Shrink WASM module size.
Executing 'bash -c 'test -f internet_identity.wasm || curl -sSL https://github.com/dfinity/internet-identity/releases/latest/download/internet_identity_dev.wasm -o internet_identity.wasm; test -f internet_identity.did || curl -sSL https://raw.githubusercontent.com/dfinity/internet-identity/main/src/internet_identity/internet_identity.did -o internet_identity.did''
Building frontend...
Error: Failed while trying to deploy canisters.
Caused by: Failed while trying to deploy canisters.
  Failed to build call canisters.
    Failed while trying to build all canisters.
      The post-build step failed for canister 'rrkah-fqaaa-aaaaa-aaaaq-cai' (auth_client_demo_assets) with an embedded error: Failed to assert source paths.: Unable to determine canonical location of asset source path /Users/black/icp/auth-client-demo/dist/auth_client_demo_assets/: No such file or directory (os error 2)

troublesprouter avatar Jan 04 '23 10:01 troublesprouter

It seems to be due to a src folder in between, that may have been added recently.

The correct path is

/Users/black/icp/auth-client-demo/dist/src/auth_client_demo_assets/

How do I modify the command to use the correct path?

troublesprouter avatar Jan 04 '23 10:01 troublesprouter

I fixed it by changing line 28 of dfx.json to

"dist/src/auth_client_demo_assets/"

I created a pull request with the fix: https://github.com/krpeacock/auth-client-demo/pull/7

troublesprouter avatar Jan 04 '23 10:01 troublesprouter