Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Bug] Quick usage example does not run. #2

Closed
Tezza48 opened this issue Jun 7, 2020 · 6 comments · Fixed by #3
Closed

[Bug] Quick usage example does not run. #2

Tezza48 opened this issue Jun 7, 2020 · 6 comments · Fixed by #3
Assignees
Labels
bug Something isn't working

Comments

@Tezza48
Copy link

Tezza48 commented Jun 7, 2020

Steps to reproduce.

  1. Create a blank .ts file.
  2. Paste in Quick Usage code with the correct import statement for CasualDB.
  3. Execute the code using deno run --allow-read --allow-write --unstable .\index.ts
  4. Observe the following error:
error: Uncaught Error: Cannot resolve module "file:///D:/source/denoPortfolio/database/writeWorker.ts"
    at WorkerImpl.#poll ($deno$/web/workers.ts:198:17)

My source: https://gist.github.com/Tezza48/2618a1d52e894d68e79161afcfa098cf

About me:
I am a web game developer from England at a small studio, working in Typescript. I'm using Deno purely for for learning, currently working on a blog/portfolio.

@rheaditi
Copy link
Member

rheaditi commented Jun 8, 2020

Hello @Tezza48!
Thanks for reporting this issue!

The bug seems to be related to denoland/deno#2751 and how Worker imports are being resolved.

Will be fixed in #3 😁

@rheaditi rheaditi added the bug Something isn't working label Jun 8, 2020
@rheaditi rheaditi linked a pull request Jun 8, 2020 that will close this issue
@Tezza48
Copy link
Author

Tezza48 commented Jun 8, 2020

Cheers!

rheaditi added a commit that referenced this issue Jun 8, 2020
Fixes #2

* bugfix: deno assumes relative path for worker

* add a log

* try using URL()

* Update mod.ts

* chore: remove test import

* chore: test dirname

* Update connector.ts

* Update README.md

* chore: remove test console.log

Co-authored-by: Aditi Mohanty <rheaditi@users.noreply.github.com>
@abinavseelan
Copy link
Member

abinavseelan commented Jun 8, 2020

@Tezza48 We've released v0.1.1 for the package.

Can you try installing this version and see if things work fine now?

- import { CasualDB } from "https://deno.land/x/casualdb@0.1.0/mod.ts"
+ import { CasualDB } from "https://deno.land/x/casualdb@0.1.1/mod.ts"

Also, we've made a deno cli flag mandatory. You'd have to pass --allow-net as well.

@abinavseelan
Copy link
Member

@all-contributors

Add @Tezza48 for bug

@allcontributors
Copy link
Contributor

@abinavseelan

I've put up a pull request to add @Tezza48! 🎉

@Tezza48
Copy link
Author

Tezza48 commented Jun 8, 2020

Appears to work like a dream. Thank you very much!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants