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

Error installing #31

Closed
aegooby opened this issue Apr 5, 2021 · 10 comments
Closed

Error installing #31

aegooby opened this issue Apr 5, 2021 · 10 comments

Comments

@aegooby
Copy link

aegooby commented Apr 5, 2021

Gives error:

error: An unsupported media type was attempted to be imported as a module.
  Specifier: https://cdn.esm.sh/v35/sha.js@2.4.11/deno/sha.js.js
  MediaType: Json

Seems to be because of the extension (.js.js) at the end is wrong; when visiting the webpage https://cdn.esm.sh/v35/sha.js@2.4.11/deno/sha.js, the file is fine.

@timreichen
Copy link
Owner

Can you post, how to reproduce it? The js.js file does indeed not exist, and the error is not created by bundler itself.

@aegooby
Copy link
Author

aegooby commented Apr 5, 2021

Simply ran the install command in the README:

deno install --unstable --allow-read --allow-write --allow-net --allow-env --name bundler https://deno.land/x/bundler/cli.ts

My Deno version is 1.8.3

@timreichen
Copy link
Owner

I think there is a problem with esm.sh, probably needs an issue there. I will look into that tomorrow.

@aegooby
Copy link
Author

aegooby commented Apr 6, 2021

So the previous issue has been fixed (thank you for the work on that by the way!) but it seems like a new one has cropped up:

Check https://deno.land/x/bundler/cli.ts
error: Uncaught SyntaxError: The requested module '/v36/caniuse-lite@1.0.30001207/deno/caniuse-lite.js' does not provide an export named 'feature'
    at <anonymous> (https://cdn.esm.sh/v36/postcss-preset-env@6.7.0/deno/postcss-preset-env.js:1:5180)

When running the same install command. Unfortunately doesn't work when setting the Deno --no-check flag either.

@timreichen
Copy link
Owner

Yeah, there is something weird going on with esm.sh server which does has nothing to do with deno nor bundler. Hopefully @ije fixes it soon. I proposed a versioned esm.sh to avoid sudden breaks.

@ije
Copy link

ije commented Apr 6, 2021

oh, sorry i'm tryng to fix it since i changed a lot things...
in v37, i can install the bundler command normally, but when i try to bundle a file, i got a strange error:
Screenshot 2021-04-07 at 04 02 13

@timreichen
Copy link
Owner

timreichen commented Apr 6, 2021

I think I saw that error before when typescript transpiles to ES5 target or lower. Maybe setting the --config target=latest will help?

@aegooby
Copy link
Author

aegooby commented Apr 8, 2021

With esm.sh v38 installation works fine, but running it gives error,

error: Uncaught Error: [esm.sh] Unsupported nodejs builtin module "inspector"
throw new Error("[esm.sh] " + "Unsupported nodejs builtin module \"inspector\"");
      ^
    at https://cdn.esm.sh/_error.js?type=unsupported-nodejs-builtin-module&name=inspector:2:7

@timreichen
Copy link
Owner

@aegooby I think this is not relevant to bundler’s code but to esm.sh. Could you post that on the esm.sh issue?

@timreichen
Copy link
Owner

Resloved by esm-dev/esm.sh#46. Should now work as expected

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

3 participants