krpeacock / auth-client-demo

Example demo of how to use https://www.npmjs.com/package/@dfinity/auth-client to make authenticated calls to an IC app
https://vasb2-4yaaa-aaaab-qadoa-cai.ic0.app/
74 stars 32 forks source link

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) #6

Open troublesprouter opened 1 year ago

troublesprouter commented 1 year ago

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 commented 1 year ago

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 commented 1 year ago

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