D
Deno

help

Deno: How to import npm scoped packages with @ in deno?

AAAlex Advent3/7/2024
I am trying to import @whiskeysockets/baileys in deno like this: import * as a from "npm:@whiskeysockets/baileys"; console.log(a); But it's showing the following error when I try to run deno run main.ts: error: Error in @whiskeysockets/baileys@6.6.0 parsing version requirement for dependency: libsignal@github:adiwajshing/libsignal-node Invalid npm version requirement. Unexpected character. github:adiwajshing/libsignal-node ~ Caused by: 0: Invalid npm version requirement. Unexpected character. github:adiwajshing/libsignal-node ~ 1: Unexpected character. github:adiwajshing/libsignal-node I'm guessing that it's interpreting 'whiskeysockets' as version number instead of the scope namespace since it's followed by '@'? Not sure. How can I fix this and import it properly?
Mmarvinh.3/7/2024
@Alex Advent looks like that dependency depends on another package that is referenced via github: . That's not supported in deno at the moment unfortunately
AAAlex Advent3/9/2024
I asked the question in the Deno Discord group about the scoped package issue with WhiskeySockets, but the reply was that the GitHub-referenced package is currently not supported in Deno.

Looking for more? Join the community!