dfx deploy --network ic failing

633 Views Asked by At

I am trying to deploy my first canister on the internet computer for an online class I am taking. Once I issue the command "dfx deploy --network ic" in the terminal I receive this output

Uploading assets to asset canister... Error: Failed while trying to deploy canisters. Caused by: Failed while trying to deploy canisters. Failed while trying to install all canisters. Failed to install wasm module to canister 'dbank_assets'. Failed to store assets in canister 'dbank_assets'. Failed asset sync with canister ryjl3-tyaaa-aaaaa-aaaba-cai. Asset with key '/main.css' defined at /home/brianw/ic-projects/dbank/dist/dbank_assets/main.css and /home/brianw/ic-projects/dbank/src/dbank_assets/assets/main.css

I have read some solutions on the Dfinity forum although the fixes mentioned do not fix it for me.

One solution was to comment out the following code in the webpack.config.js file


    CopyPlugin({
      patterns: [
        {
          from: path.join(__dirname, "src", frontendDirectory, "assets"),
          to: path.join(__dirname, "dist", frontendDirectory),
        },
      ],
    }),

Also this solution requires removing the dist directory. So I have tried this already.

Any help would be greatly appreciated and I will also post a solution if one is found, on Dfinity forum as well.

1

There are 1 best solutions below

1
On

hello it's been a long time ago but incase anybody comes across this later, it could be an issue with folder location in wsl, if you are using a windows machine, you need to save your project file in the ubuntu home directory and not an any directory on the windows space of your machine.