I am working with the LinkedUp example and tweaking it. I ran into the following issue when I was trying to use the main.js from it that has bootstrap included.
Child
Hash: f3ed073ee7fd679f6bfa
Time: 96ms
Built at: 02/10/2020 11:43:01 PM
Entrypoint main =
[0] ./src/hello_location/profile/public/main.js + 2 modules 9.45 KiB {0} [built]
| ./src/hello_location/profile/public/main.js 6.17 KiB [built]
| ./src/hello_location/profile/public/templates.js 3.03 KiB [built]
| ./src/hello_location/profile/public/utils.js 251 bytes [built]
ERROR in ./src/hello_location/profile/public/main.js
Module not found: Error: Can't resolve 'animate.css/animate.min.css' in '/Users/adam.tothfejel/Desktop/ProgrammableLoans/src/hello_location/profile/public'
@ ./src/hello_location/profile/public/main.js 13:0-37
ERROR in ./src/hello_location/profile/public/main.js
Module not found: Error: Can't resolve 'bootstrap' in '/Users/adam.tothfejel/Desktop/ProgrammableLoans/src/hello_location/profile/public'
@ ./src/hello_location/profile/public/main.js 4:0-19
ERROR in ./src/hello_location/profile/public/main.js
Module not found: Error: Can't resolve 'bootstrap/dist/css/bootstrap.min.css' in '/Users/adam.tothfejel/Desktop/ProgrammableLoans/src/hello_location/profile/public'
@ ./src/hello_location/profile/public/main.js 12:0-46
ERROR in ./src/hello_location/profile/public/main.js
Module not found: Error: Can't resolve 'ic:canisters/profile' in '/Users/adam.tothfejel/Desktop/ProgrammableLoans/src/hello_location/profile/public'
@ ./src/hello_location/profile/public/main.js 7:0-43 18:0-7 89:29-36 92:33-40 104:27-34 109:10-17 110:10-17 129:37-44 139:32-39 153:16-23 154:16-23 180:27-34 237:6-13
seems like there are some resources missing, did you check if modules from the error codes exist under the specified paths?
if youâre using the linkedup repo, make sure youâre on the sj/inter-canister-calls branch and use dfx v0.5.0. you could use this to get everything up and running first
Yes this is what I get after dfx build. I checked all modules existed in my package.json file just like the LinkedUp example. Here is my Github repo: https://github.com/adam0000345/TestProject.
That worked for me, thank you very much. Question, when I build the project why can I do it with my internet on? I thought all network activity needed to be turned off during building as according to the tutorials? Additionally, how would I get the webpage to show up? I am going to this URL: http://localhost:8000/?canisterId=ic:6EDF27FC7ACF1176BD. Thank you.
Sorry I meant to say this: âYou have stopped any network client processes running on the local computer.â I would assume this meant that I could not have internet on when building? https://sdk.dfinity.org/developers-guide/tutorials/hello-location.html. Ok will give that shot a thanks.
Pretty sure this relates to make sure that there is currently no instance of the local dfx network running, so make sure you run dfx stop before you start this tutorial
Question though, I have bits from hello location tutorial where I have accessed the URL as follows: Installing code for canister hello_location, with canister_id ic:E75C3765B661880C3E, using the URL format like above. What exactly does the above do? Would they conflict with each other if I merging things together?
Each time you run dfx build the newest version of your built canister will have a different ID, thats why you have to make sure you always use the newest ID. The above commands help doing that if you run them each time after you run dfx build. If you merge the code together and then run dfx build you will create new canisters with new IDs.
From the output of dfx it looks like you might have an error in line 7 of your âmain.moâ file
Feb 11 17:45:37.521 WARN Could not perform query on canister: IC0503: Canister ic:0EE46DF4C7303EA281 trapped explicitly: assertion failed at /Users/moritz/projects/dfinity/TestProject/src/hello_location/main.mo-4452262913657323220:7.25-7.37, Application: Http Handler
But i donât really know as i dont know what you have changed
No problem, always feel free to ask questions Thatâs what this place is for. I might be a bit overwhelming at the beginning, but there will be more and more examples, tutorials and documentation soon!
If you donât mind, I did use the above:
ID=(xxd -u -p canisters/profile/_canister.id)
CRC=(python2 -c âimport crc8;h=crc8.crc8();h.update(â$IDâ.decode(âhexâ));print(h.hexdigest())â)
xdg-open âhttp://127.0.0.1:8000/?canisterId=ic:$ID$CRCâ