deno: 404 when importing type declaration files from pika.dev using Deno 1.0.2

I have the following source code:

import * as pkg from 'https://cdn.pika.dev/node-fetch/^2.6.0';
console.log('PACKAGE:', pkg);

Running on latest (1.0.2) yields:

deno --version
deno 1.0.2
v8 8.4.300
typescript 3.9.2

deno run --reload <above_test>
Download https://cdn.pika.dev/node-fetch/^2.6.0
Download https://cdn.pika.dev/-/node-fetch@v2.6.0-AJHWZQobu33EvFJcmA2J/dist=es2019,mode=types/index.d.ts
Download https://cdn.pika.dev/-/node-fetch@v2.6.0-AJHWZQobu33EvFJcmA2J/dist=es2019/node-fetch.js
Download https://cdn.pika.dev/http/dist=es2019,mode=types/index.d.ts
Download https://cdn.pika.dev/url/dist=es2019,mode=types/index.d.ts
Download https://cdn.pika.dev/-/node-fetch@v2.6.0-AJHWZQobu33EvFJcmA2J/dist=es2019,mode=types/externals.d.ts
Download https://cdn.pika.dev/-/url@v0.11.0-4GEt8r64v6xtacsEmNHX/dist=es2019,mode=types/index.d.ts
Download https://cdn.pika.dev/-/http@v0.0.1-security/dist=es2019,mode=types/index.d.ts
error: Import 'https://cdn.pika.dev/-/url@v0.11.0-4GEt8r64v6xtacsEmNHX/dist=es2019,mode=types/index.d.ts' failed: 404 Not Found

FYI, the http and url packages do not exist on pika.dev. It seems like the request tries to get type definitions for all sub-dependencies, but fails if they do not exist.

Possibly related to: #5029 #5726

@bartlomieju

Also possibly relating to: https://github.com/pikapkg/cdn/issues/3 and https://github.com/pikapkg/cdn/issues/8

About this issue

  • Original URL
  • State: closed
  • Created 4 years ago
  • Comments: 15 (11 by maintainers)

Most upvoted comments

I’m now using import sinon from "https://dev.jspm.io/sinon@7.5.0"; (Sinon is the overall dependency that then depends uponfake-timers).

@jamesseanwright I just tried running this example on latest master and it compiles without a problem - I think the problem was fixed #6000, but I’m gonna keep this issue open until 1.0.4 is released.