#How to import npm module from github?

20 messages · Page 1 of 1 (latest)

dapper delta
#

I tried ts // @deno-types="npm:@types/unzipper@0.10" export { Extract } from "https://github.com/ZJONSSON/node-unzipper/raw/341f258/lib/extract.js"; , but it did not work: ```
error: Uncaught SyntaxError: The requested module 'https://github.com/ZJONSSON/node-unzipper/raw/341f258/lib/extract.js' does not provide an export named 'Extract'
export { Extract } from "https://github.com/ZJONSSON/node-unzipper/raw/341f258/lib/extract.js";
^
at <anonymous> (file:///E:/voicevox-project/vvproxy/deps.ts:3:10)

#

I guess that I need to make deno recognize it's a npm module, but i don't know how to.

feral shale
#
dapper delta
#

yes, but I want to use unreleased version

feral shale
#

Hm. Not sure if this is possible with the current setup, definitely interesting. What is your usecase? Would https://deno.land/x/zip not work for what you're trying to do?

dapper delta
#

It didn't.

feral shale
#

What are you trying to do?

dapper delta
#

Unzipping

feral shale
# dapper delta Unzipping

.zip is not just one standard. Where are these zips coming from? A lot of "streamable unzip" libraries cannot work the way they are advertised because some zip formats are not streamably unzippable.

#

Is there a reason you need the unreleased version? Does importing the one on npm work right now?

dapper delta
feral shale
dapper delta
#

I didn't know this, i'll try it

#

(sigh)

dapper delta
#

thanks, it worked

#

well,

How to import npm module from github?
The answer is "impossible"?