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 - decodeNamedCharacterReference #262

Closed
TomokiMiyauci opened this issue Feb 5, 2022 · 1 comment
Closed

Failed to import - decodeNamedCharacterReference #262

TomokiMiyauci opened this issue Feb 5, 2022 · 1 comment
Labels
deno Not working in Deno

Comments

@TomokiMiyauci
Copy link

Failing module

import { decodeNamedCharacterReference } from "https://esm.sh/decode-named-character-reference";
console.log(decodeNamedCharacterReference("amp"));

Error message

After running deno run I got this:

error: Uncaught ReferenceError: document is not defined
    at https://cdn.esm.sh/v64/decode-named-character-reference@1.0.1/deno/decode-named-character-reference.js:2:7

Additional info

Perhaps the browser in the exports field of package.json has been resolved.

// package.json
{
  ...,
  "type": "module",
  "main": "index.js",
  "types": "index.d.ts",
  "exports": {
    ".": {
      "deno": "./index.js",
      "react-native": "./index.js",
      "worker": "./index.js",
      "browser": "./index.dom.js",
      "default": "./index.js"
    }
  }
}
  • esm.sh version: 64
  • Deno version: 1.18.2
@TomokiMiyauci TomokiMiyauci added the deno Not working in Deno label Feb 5, 2022
@ije ije closed this as completed in 3802156 Feb 5, 2022
@ije
Copy link
Member

ije commented Feb 5, 2022

fixed in v65

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

2 participants