dfinity / examples

Example applications, microservices, and code samples for the Internet Computer
https://dfinity.org
Apache License 2.0
548 stars 395 forks source link

Motoko encrypted-notes-dapp-vetkd: Does not deploy #990

Closed jessiemongeon1 closed 2 months ago

jessiemongeon1 commented 2 months ago

Does not deploy due to cannot resolve file paths

fspreiss commented 2 months ago

@jessiemongeon1, thanks for the report! can you elaborate what you mean with "old URLs"? What error do you see? I just tried to compile and deploy and run the dapp for both build environments (export BUILD_ENV=rust and export BUILD_ENV=motoko), and it worked for both, using dfx 0.23.0.

jessiemongeon1 commented 2 months ago

@fspreiss by URLs I mean file paths (I should have been clearer in the initial issue), I get the following error when trying to deploy:

Error: Could not resolve '../../../declarations/encrypted_notes_motoko/encrypted_notes_motoko.did.js' from src/frontend/src/lib/backend.ts
fspreiss commented 2 months ago

@jessiemongeon1, which steps are you performing before you arrive at this error? Are you following the instructions of the README? At which step do you see the mentioned error? Note that the deployment instructions of the README are to a big part automated in the Makefile in the test-e2e target, so you could first try make clean to clean your environment, and then make test-e2e.

fspreiss commented 2 months ago

@jessiemongeon1, also note that the file you are seemingly missing is generated in Step 10 of the instructions in the README. Step 10 says: dfx generate "encrypted_notes_$BUILD_ENV": possibly you didn't have a BUILD_ENV set (see Step1 of the instructions), which could have caused Step10 to fail.

jessiemongeon1 commented 2 months ago

Yes, I followed the instructions in the README and set the BUILD_ENV variable as the README says. Running make clean and make test-e2e seems to have resolved the issue. Thanks!

fspreiss commented 2 months ago

Happy to hear! Let me know if you think we should adapt the README to recommend running, e.g., make clean at the beginning (e.g., if people face deployment issues).