$quaves
$quaves•2mo ago

std/node is removed but not replaced

hi, how can i fix this:
deno run ../music/src/main.ts
error: Module not found "https://deno.land/std@0.224.0/node/events.ts".
at https://raw.githubusercontent.com/Zhomart/dex/930253915093e1e08d48ec0409b4aee800d8bd0c/lib-dyn/deps.ts:7:24
deno run ../music/src/main.ts
error: Module not found "https://deno.land/std@0.224.0/node/events.ts".
at https://raw.githubusercontent.com/Zhomart/dex/930253915093e1e08d48ec0409b4aee800d8bd0c/lib-dyn/deps.ts:7:24
look like the library was removed: https://deno.land/std@0.224.0/node/events.ts
2 Replies
$quaves
$quaves•2mo ago
it seems like, the problem is this library: https://deno.land/x/denodb@v1.4.0/mod.ts too bad, deno doesnt show the dependencies of this
Deno AI Helper
Deno AI Helper•2mo ago
Hello! The issue you're encountering is due to the removal of std/node modules from the Deno standard library. As per the documentation, this code was moved to the main Deno repository and is now directly embedded in the Deno runtime. For users who were relying on https://deno.land/std/node, it is recommended to pin the version of std to the 0.177.0 version or by using the built-in Node module specifiers. To resolve your issue, you can import the events module using the built-in Node module specifier like this:
import events from "node:events";
import events from "node:events";
Alternatively, if you need to use the version from the Deno standard library for some reason, you can pin the version of std to 0.177.0 in your import statement:
import events from "https://deno.land/std@0.177.0/node/events.ts";
import events from "https://deno.land/std@0.177.0/node/events.ts";
Please update your import statements accordingly, and that should fix the error you're seeing. 🦕