Skip to content

No CSS/JS loaded when viewing asset canister #62

@stephenplusplus

Description

@stephenplusplus

Hello 👋🏻

I've been trying to get this running, following the README, but when I get to the final step to view the built asset canister, it doesn't load any JavaScript or CSS files. I dug through the .dfx folder to see that a few CSS/JS files made it in there. I'm still new to how dfinity apps are meant to be built and run, so I tried a hacky solution to get "index.css" and "index.js" inserted into the page (by adding link/script tags to src/linkedup/public/index.html). Rebuilding and reinstalling to the canister got them to load in the browser, but a new error emerged:

index.js:2 Uncaught TypeError: Cannot read property 'retrieve' of undefined
    at Module.<anonymous> (index.js:2)
    at r (index.js:2)
    at index.js:2
    at index.js:2

That maps to the minified version of main.js:

    (void 0).retrieve("index.html")

Which is:

linkedup_assets
.retrieve("index.html")

I have a feeling since I'm improperly including the js file, it didn't get properly processed to load what ended up being void 0. In any case, it was time for me to stop guessing and see if anyone could help get me started :)

Thank you for your time and help!

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions