nestdotland / nest.land

🦕 The Nest Website
https://nest.land
MIT License
371 stars 19 forks source link

Issue with publishing a library #329

Closed selfrefactor closed 2 years ago

selfrefactor commented 2 years ago

I followed the official documentation of publishing a library to Nest.land

My issue is that this works:


import {add} from "https://x.nest.land/rambda@7.0.4/src/add.js";

function totalCost(outbound: any, inbound: any){
  return add(outbound, inbound)
}

console.log(totalCost(19, 31));

while this code:

import * as R from "https://x.nest.land/rambda@7.0.4/mod.ts";

function totalCost(outbound: any, inbound: any){
  return R.add(outbound, inbound)
}

console.log(totalCost(19, 31));

fails every time with:

Download https://x.nest.land/rambda@7.0.4/src/zipObj
Download https://x.nest.land/rambda@7.0.4/src/zipWith
error: Module not found "https://x.nest.land/rambda@7.0.4/src/where".
    at https://x.nest.land/rambda@7.0.4/rambda.js:166:15

Another thing to note is that the error is different every time i.e. this time it is missing src/where, while next time it will be src/compose.

I am not using Deno, but I have opened issue in my library(Rambda) to improve Deno support.

maximousblk commented 2 years ago

Hey @selfrefactor,

It looks like you are missing file extensions in your imports. Deno doesn't support importing without file extensions

- https://x.nest.land/rambda@7.0.4/src/zipObj
+ https://x.nest.land/rambda@7.0.4/src/zipObj.js

and i think it's different every time because deno is downloading the files in different order every time.

selfrefactor commented 2 years ago

thanks a lot. I will try with your suggestion and if successful, I'll close the issue.

selfrefactor commented 2 years ago

I am almost sure that it will work, so I am closing the issue; thanks for the fast reply.