Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

problem with deno sample on https://repl.it/@balupton/caterpillar-deno#index.ts #130

Open
77it opened this issue Oct 25, 2020 · 4 comments

Comments

@77it
Copy link

77it commented Oct 25, 2020

running the sample from https://repl.it/@balupton/caterpillar-deno#index.ts with deno (version 1.4.2) I receive the error

error: Import 'https://unpkg.com/[email protected]/edition-deno/index.ts' failed: 404 Not Found
Imported from "https://unpkg.com/[email protected]/edition-deno/logger.ts:1"

a solution was to import the library not with unpkg.com but with jspm.dev

import { Logger, Filter, Human } from 'https://jspm.dev/caterpillar'

or skypack.dev

import { Logger, Filter, Human } from 'https://cdn.skypack.dev/caterpillar'

In this way the sample works perfectly

@balupton
Copy link
Member

Thanks for the heads up. Will get around to fix this up properly in the coming days.

@balupton
Copy link
Member

balupton commented Oct 29, 2020

so tracked it down, make-deno-edition is not failing to compile:

necessary entry file [/Users/balupton/Projects/caterpillar/source/index.ts] failed
↳  has import incompatibilities
  ↳  internal import of [./logger.js] => [./logger.ts]
    ↳  import of local file [./logger.js] has incompatibilities
  ↳  internal import of [./transforms/filter.js] => [./transforms/filter.ts]
    ↳  import of local file [./transforms/filter.js] has incompatibilities
  ↳  internal import of [./transforms/human.js] => [./transforms/human.ts]
    ↳  import of local file [./transforms/human.js] has incompatibilities

optional utility file [/Users/balupton/Projects/caterpillar/source/logger.ts] skipped
↳  has import incompatibilities
  ↳  dep import of [rfc-log-levels] => [https://unpkg.com/rfc-log-levels@^3.14.0/edition-esnext/index.js]
    ↳  resolved to [rfc-log-levels/edition-esnext/index.js], which does not have the .ts extension

seems rfc-log-levels is not having a typescript edition published anymore, will look into it

@balupton
Copy link
Member

balupton commented Oct 29, 2020

so it is failing for this reason:

> npx make-deno-edition
make-deno-edition: FAILURE!

The required deno edition could not be created for the following reasons:

necessary entry file [/Users/balupton/Projects/auto/rfc-log-levels/source/index.ts] failed
↳  has import incompatibilities
  ↳  dep import of [rfc-log-levels] => [undefined]
    ↳  appears to be an uninstalled dependency, install it and try again

optional test file [/Users/balupton/Projects/auto/rfc-log-levels/source/test.ts] skipped
↳  has import incompatibilities
  ↳  dep import of [kava] => [https://unpkg.com/kava@^5.13.0/source/index.js]
    ↳  resolved to [kava/source/index.js], which does not have the .ts extension
  ↳  internal import of [./index.js] => [./index.ts]
    ↳  import of local file [./index.js] has incompatibilities

which is probably due to this:

https://github.com/bevry/rfc-log-levels/blob/f4761e552b643292e6262d8c80f347eaac1c5289/source/index.ts#L75

which I believe we have fixed this false detection in make-deno-edition a few times already, however perhaps another change is necessary

if someone can look into this, that would be great, as too short on time right now

@balupton
Copy link
Member

also figured out another contributing factor, the deno editions won't be getting generated on CI as deno doesn't exist there, so the unpkg and surge URLs for them do not exist, despire the readme file being generated on my local machine where Deno and consequently those compile targets do exist

Solution for this is installing Deno on the CI

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

No branches or pull requests

2 participants