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

Module not found "https://deno.land/std/node/events.ts". #381

Closed
CrispenGari opened this issue May 7, 2023 · 6 comments
Closed

Module not found "https://deno.land/std/node/events.ts". #381

CrispenGari opened this issue May 7, 2023 · 6 comments

Comments

@CrispenGari
Copy link

I'm becoming in love with denodb a cute version of ORM with a good documentation, I started working with it today but I'm getting the error saying:

error: Module not found "https://deno.land/std/node/events.ts".
    at https://raw.githubusercontent.com/Zhomart/dex/930253915093e1e08d48ec0409b4aee800d8bd0c/lib-dyn/deps.ts:7:24

I don't know why is this associated with denodb. What maybe possibly the issue with this. Here are the logs when i try to start my deno app:

Warning Implicitly using latest version (0.186.0) for https://deno.land/std/node/stream.ts
Warning Implicitly using latest version (0.186.0) for https://deno.land/std/node/events.ts
Warning Implicitly using latest version (0.186.0) for https://deno.land/std/node/assert.ts
Warning Implicitly using latest version (0.186.0) for https://deno.land/std/node/util.ts
Warning Implicitly using latest version (0.186.0) for https://deno.land/std/node/url.ts
error: Module not found "https://deno.land/std/node/events.ts".
    at https://raw.githubusercontent.com/Zhomart/dex/930253915093e1e08d48ec0409b4aee800d8bd0c/lib-dyn/deps.ts:7:24

But when i remove denodb code it works. What maybe possibly the problem?

@CrispenGari
Copy link
Author

I also believe that the error is raise because of the deps.ts file that is in the test folder which is using the std@0.115.1 which is not the latest version.

If it can be changed to:

export { assertEquals } from "https://deno.land/std@0.186.0/testing/asserts.ts";

to:

export { assertEquals } from "https://deno.land/std@0.115.1/testing/asserts.ts";

It can work, as std/node was removed starting from version: 0.178.0 as mentioned deno_std - 0.178.0

@matthewmorek
Copy link

I have exactly the same issue, though since I'm trying to use DenoDB with Deno Fresh, I have no control over dependencies (that I know of; there's no deps.ts file), so I can't move forward with the build.

@cesarmarinhorj
Copy link

same issue. cant use denodb...

@myatease
Copy link

最近尝试使用fresh,import denodb时出错,查看std版本发现178 移除了node

@jerichosiahaya
Copy link

Duplicate of #379

@CrispenGari
Copy link
Author

I solved this issue by opening the deno.json and modify it to look as follows:

{
  "tasks": {
    "start": "deno run --watch --allow-sys --allow-net --allow-read --allow-env  src/index.ts"
  },
  "scopes": {
    "https://raw.githubusercontent.com/Zhomart/dex/": {
      "https://deno.land/std/": "https://deno.land/std@0.177.0/"
    }
  },
  "compilerOptions": {
    "allowJs": true,
    "lib": ["deno.window"],
    "strict": true
  }
}

I just added the "scopes" property which is this guy right here 👇 :

  "scopes": {
    "https://raw.githubusercontent.com/Zhomart/dex/": {
      "https://deno.land/std/": "https://deno.land/std@0.177.0/"
    }
  }

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

5 participants