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

Failed to import - @wooorm/starry-night (.css.js extension being mishandled?) #728

Closed
birtles opened this issue Sep 21, 2023 · 0 comments
Closed
Labels
deno Not working in Deno

Comments

@birtles
Copy link

birtles commented Sep 21, 2023

Failing module

import { something } from " https://esm.sh/@wooorm/[email protected]/"

Error message

After running deno run I got this:

Command failed with exit code 1: deno run --allow-all --no-config --import-map=/opt/buildhome/node-deps/node_modules/@netlify/edge-bundler/deno/vendor/import_map.json --quiet /opt/buildhome/node-deps/node_modules/@netlify/edge-bundler/deno/bundle.ts {basePath:/opt/build/repo,destPath:/tmp/edge-650becb62c763a0008a91779/023c2e8e-d4e8-4758-aa47-08d49427fcba.eszip,externals:[],functions:[{name:markdown-preview,path:/opt/build/repo/netlify/edge-functions/markdown-preview.js}],importMapData:{\imports\:{\unist-util-visit-parents\:\https://esm.sh/[email protected]\,\unist-util-visit\:\https://esm.sh/[email protected]\,\unified\:\https://esm.sh/[email protected]\,\remark-smartypants\:\https://esm.sh/[email protected]\,\remark-rehype\:\https://esm.sh/[email protected]\,\remark-parse\:\https://esm.sh/[email protected]\,\remark-breaks\:\https://esm.sh/[email protected]\,\rehype-stringify\:\https://esm.sh/[email protected]\,\rehype-sanitize\:\https://esm.sh/[email protected]\,\rehype-external-links\:\https://esm.sh/[email protected]\,\normalize-url\:\https://esm.sh/[email protected]\,\hast-util-to-string\:\https://esm.sh/[email protected]\,\email-regex-safe\:\https://esm.sh/[email protected]\,\@wooorm/starry-night\:\https://esm.sh/@wooorm/[email protected]\,\@netlify/edge-functions\:\https://edge.netlify.com/v1/index.ts\,\netlify:edge\:\https://edge.netlify.com/v1/index.ts?v=legacy\},\scopes\:{}}} (https://ntl.fyi/exit-code-1)
error: Uncaught (in promise) Error: Module not found https://esm.sh/v132/@wooorm/[email protected]/denonext/source.css.js.
      const ret = new Error(getStringFromWasm0(arg0, arg1));
                  ^
    at __wbg_new_15d3966e9981a196 (file:///opt/buildhome/node-deps/node_modules/@netlify/edge-bundler/deno/vendor/deno.land/x/[email protected]/eszip_wasm.generated.js:417:19)
    at <anonymous> (file:///opt/buildhome/node-deps/node_modules/@netlify/edge-bundler/deno/vendor/deno.land/x/[email protected]/eszip_wasm_bg.wasm:1:93412)
    at <anonymous> (file:///opt/buildhome/node-deps/node_modules/@netlify/edge-bundler/deno/vendor/deno.land/x/[email protected]/eszip_wasm_bg.wasm:1:1499594)
    at <anonymous> (file:///opt/buildhome/node-deps/node_modules/@netlify/edge-bundler/deno/vendor/deno.land/x/[email protected]/eszip_wasm_bg.wasm:1:1938165)
    at __wbg_adapter_40 (file:///opt/buildhome/node-deps/node_modules/@netlify/edge-bundler/deno/vendor/deno.land/x/[email protected]/eszip_wasm.generated.js:231:6)
    at real (file:///opt/buildhome/node-deps/node_modules/@netlify/edge-bundler/deno/vendor/deno.land/x/[email protected]/eszip_wasm.generated.js:215:14)
    at eventLoopTick (ext:core/01_core.js:182:11)

Additional info

  • esm.sh version: ?
  • Deno version: Whatever version Netlify Edge functions is using

Originally reported as wooorm/starry-night#33

If I try to open https://esm.sh/v132/@wooorm/[email protected]/es2022/source.css.js it redirects to https://esm.sh/@wooorm/[email protected]/es2022/source.css and I get a 404.

Other files like https://esm.sh/v132/@wooorm/[email protected]/es2022/source.c.js for example work as expected.

It looks like the .css.js extension is being treated differently.

#393 looks similar but appears to get 5xx errors instead of 404.

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

No branches or pull requests

1 participant