esm-dev / esm.sh

A fast, smart, & global CDN for modern(es2015+) web development.
https://esm.sh
MIT License
3.14k stars 151 forks source link

Failed to import - xdm #135

Closed talentlessguy closed 1 year ago

talentlessguy commented 3 years ago

Failing module

import { compile } from 'https://esm.sh/xdm'

Error message

After running deno run I get this:

error: TS2694 [ERROR]: Namespace '__' has no exported member 'Program'.
      import('https://cdn.esm.sh/v50/@types/estree@0.0.50/index.d.ts').Program,
                                                                       ~~~~~~~
    at https://cdn.esm.sh/v50/xdm@2.0.2/lib/plugin/recma-document.d.ts:11:72

TS2694 [ERROR]: Namespace '__' has no exported member 'Program'.
      import('https://cdn.esm.sh/v50/@types/estree@0.0.50/index.d.ts').Program
                                                                       ~~~~~~~
    at https://cdn.esm.sh/v50/xdm@2.0.2/lib/plugin/recma-document.d.ts:12:72

TS2694 [ERROR]: Namespace '"https://cdn.esm.sh/v50/estree-jsx@0.0.1/dist/index.d.ts"' has no exported member 'Directive'.
export type Directive = import('https://cdn.esm.sh/v50/estree-jsx@0.0.1/dist/index.d.ts').Directive
                                                                                          ~~~~~~~~~
    at https://cdn.esm.sh/v50/xdm@2.0.2/lib/plugin/recma-document.d.ts:14:91

TS2694 [ERROR]: Namespace '"https://cdn.esm.sh/v50/estree-jsx@0.0.1/dist/index.d.ts"' has no exported member 'ExportDefaultDeclaration'.
  import('https://cdn.esm.sh/v50/estree-jsx@0.0.1/dist/index.d.ts').ExportDefaultDeclaration
                                                                    ~~~~~~~~~~~~~~~~~~~~~~~~
    at https://cdn.esm.sh/v50/xdm@2.0.2/lib/plugin/recma-document.d.ts:16:69

TS2694 [ERROR]: Namespace '"https://cdn.esm.sh/v50/estree-jsx@0.0.1/dist/index.d.ts"' has no exported member 'ExportSpecifier'.
export type ExportSpecifier = import('https://cdn.esm.sh/v50/estree-jsx@0.0.1/dist/index.d.ts').ExportSpecifier
                                                                                                ~~~~~~~~~~~~~~~
    at https://cdn.esm.sh/v50/xdm@2.0.2/lib/plugin/recma-document.d.ts:17:97

TS2694 [ERROR]: Namespace '"https://cdn.esm.sh/v50/estree-jsx@0.0.1/dist/index.d.ts"' has no exported member 'ExportNamedDeclaration'.
export type ExportNamedDeclaration = import('https://cdn.esm.sh/v50/estree-jsx@0.0.1/dist/index.d.ts').ExportNamedDeclaration
                                                                                                       ~~~~~~~~~~~~~~~~~~~~~~
    at https://cdn.esm.sh/v50/xdm@2.0.2/lib/plugin/recma-document.d.ts:18:104

TS2694 [ERROR]: Namespace '"https://cdn.esm.sh/v50/estree-jsx@0.0.1/dist/index.d.ts"' has no exported member 'ExportAllDeclaration'.
export type ExportAllDeclaration = import('https://cdn.esm.sh/v50/estree-jsx@0.0.1/dist/index.d.ts').ExportAllDeclaration
                                                                                                     ~~~~~~~~~~~~~~~~~~~~
    at https://cdn.esm.sh/v50/xdm@2.0.2/lib/plugin/recma-document.d.ts:19:102

TS2694 [ERROR]: Namespace '"https://cdn.esm.sh/v50/estree-jsx@0.0.1/dist/index.d.ts"' has no exported member 'Expression'.
export type Expression = import('https://cdn.esm.sh/v50/estree-jsx@0.0.1/dist/index.d.ts').Expression
                                                                                           ~~~~~~~~~~
    at https://cdn.esm.sh/v50/xdm@2.0.2/lib/plugin/recma-document.d.ts:20:92

TS2694 [ERROR]: Namespace '"https://cdn.esm.sh/v50/estree-jsx@0.0.1/dist/index.d.ts"' has no exported member 'FunctionDeclaration'.
export type FunctionDeclaration = import('https://cdn.esm.sh/v50/estree-jsx@0.0.1/dist/index.d.ts').FunctionDeclaration
                                                                                                    ~~~~~~~~~~~~~~~~~~~
    at https://cdn.esm.sh/v50/xdm@2.0.2/lib/plugin/recma-document.d.ts:21:101

TS2694 [ERROR]: Namespace '"https://cdn.esm.sh/v50/estree-jsx@0.0.1/dist/index.d.ts"' has no exported member 'ImportDeclaration'.
export type ImportDeclaration = import('https://cdn.esm.sh/v50/estree-jsx@0.0.1/dist/index.d.ts').ImportDeclaration
                                                                                                  ~~~~~~~~~~~~~~~~~
    at https://cdn.esm.sh/v50/xdm@2.0.2/lib/plugin/recma-document.d.ts:22:99

TS2694 [ERROR]: Namespace '"https://cdn.esm.sh/v50/estree-jsx@0.0.1/dist/index.d.ts"' has no exported member 'ModuleDeclaration'.
export type ModuleDeclaration = import('https://cdn.esm.sh/v50/estree-jsx@0.0.1/dist/index.d.ts').ModuleDeclaration
                                                                                                  ~~~~~~~~~~~~~~~~~
    at https://cdn.esm.sh/v50/xdm@2.0.2/lib/plugin/recma-document.d.ts:24:99

TS2694 [ERROR]: Namespace '"https://cdn.esm.sh/v50/estree-jsx@0.0.1/dist/index.d.ts"' has no exported member 'Node'.
export type Node = import('https://cdn.esm.sh/v50/estree-jsx@0.0.1/dist/index.d.ts').Node
                                                                                     ~~~~
    at https://cdn.esm.sh/v50/xdm@2.0.2/lib/plugin/recma-document.d.ts:25:86

TS2694 [ERROR]: Namespace '"https://cdn.esm.sh/v50/estree-jsx@0.0.1/dist/index.d.ts"' has no exported member 'Program'.
export type Program = import('https://cdn.esm.sh/v50/estree-jsx@0.0.1/dist/index.d.ts').Program
                                                                                        ~~~~~~~
    at https://cdn.esm.sh/v50/xdm@2.0.2/lib/plugin/recma-document.d.ts:26:89

TS2694 [ERROR]: Namespace '"https://cdn.esm.sh/v50/estree-jsx@0.0.1/dist/index.d.ts"' has no exported member 'SimpleLiteral'.
export type SimpleLiteral = import('https://cdn.esm.sh/v50/estree-jsx@0.0.1/dist/index.d.ts').SimpleLiteral
                                                                                              ~~~~~~~~~~~~~
    at https://cdn.esm.sh/v50/xdm@2.0.2/lib/plugin/recma-document.d.ts:27:95

TS2694 [ERROR]: Namespace '"https://cdn.esm.sh/v50/estree-jsx@0.0.1/dist/index.d.ts"' has no exported member 'Statement'.
export type Statement = import('https://cdn.esm.sh/v50/estree-jsx@0.0.1/dist/index.d.ts').Statement
                                                                                          ~~~~~~~~~
    at https://cdn.esm.sh/v50/xdm@2.0.2/lib/plugin/recma-document.d.ts:28:91

TS2694 [ERROR]: Namespace '"https://cdn.esm.sh/v50/estree-jsx@0.0.1/dist/index.d.ts"' has no exported member 'VariableDeclarator'.
export type VariableDeclarator = import('https://cdn.esm.sh/v50/estree-jsx@0.0.1/dist/index.d.ts').VariableDeclarator
                                                                                                   ~~~~~~~~~~~~~~~~~~
    at https://cdn.esm.sh/v50/xdm@2.0.2/lib/plugin/recma-document.d.ts:29:100

TS2694 [ERROR]: Namespace '"https://cdn.esm.sh/v50/estree-jsx@0.0.1/dist/index.d.ts"' has no exported member 'SpreadElement'.
export type SpreadElement = import('https://cdn.esm.sh/v50/estree-jsx@0.0.1/dist/index.d.ts').SpreadElement
                                                                                              ~~~~~~~~~~~~~
    at https://cdn.esm.sh/v50/xdm@2.0.2/lib/plugin/recma-document.d.ts:30:95

TS2694 [ERROR]: Namespace '"https://cdn.esm.sh/v50/estree-jsx@0.0.1/dist/index.d.ts"' has no exported member 'Property'.
export type Property = import('https://cdn.esm.sh/v50/estree-jsx@0.0.1/dist/index.d.ts').Property
                                                                                         ~~~~~~~~
    at https://cdn.esm.sh/v50/xdm@2.0.2/lib/plugin/recma-document.d.ts:31:90

TS2694 [ERROR]: Namespace '"https://cdn.esm.sh/v50/estree-jsx@0.0.1/dist/index.d.ts"' has no exported member 'Node'.
export type Node = import('https://cdn.esm.sh/v50/estree-jsx@0.0.1/dist/index.d.ts').Node
                                                                                     ~~~~
    at https://cdn.esm.sh/v50/xdm@2.0.2/lib/plugin/recma-stringify.d.ts:10:86

TS2694 [ERROR]: Namespace '"https://cdn.esm.sh/v50/estree-jsx@0.0.1/dist/index.d.ts"' has no exported member 'Program'.
export type Program = import('https://cdn.esm.sh/v50/estree-jsx@0.0.1/dist/index.d.ts').Program
                                                                                        ~~~~~~~
    at https://cdn.esm.sh/v50/xdm@2.0.2/lib/plugin/recma-stringify.d.ts:11:89

TS2694 [ERROR]: Namespace '"https://cdn.esm.sh/v50/estree-jsx@0.0.1/dist/index.d.ts"' has no exported member 'JSXClosingFragment'.
export type JSXClosingFragment = import('https://cdn.esm.sh/v50/estree-jsx@0.0.1/dist/index.d.ts').JSXClosingFragment
                                                                                                   ~~~~~~~~~~~~~~~~~~
    at https://cdn.esm.sh/v50/xdm@2.0.2/lib/plugin/recma-stringify.d.ts:14:100

TS2694 [ERROR]: Namespace '"https://cdn.esm.sh/v50/estree-jsx@0.0.1/dist/index.d.ts"' has no exported member 'JSXEmptyExpression'.
export type JSXEmptyExpression = import('https://cdn.esm.sh/v50/estree-jsx@0.0.1/dist/index.d.ts').JSXEmptyExpression
                                                                                                   ~~~~~~~~~~~~~~~~~~
    at https://cdn.esm.sh/v50/xdm@2.0.2/lib/plugin/recma-stringify.d.ts:16:100

TS2694 [ERROR]: Namespace '"https://cdn.esm.sh/v50/estree-jsx@0.0.1/dist/index.d.ts"' has no exported member 'JSXMemberExpression'.
export type JSXMemberExpression = import('https://cdn.esm.sh/v50/estree-jsx@0.0.1/dist/index.d.ts').JSXMemberExpression
                                                                                                    ~~~~~~~~~~~~~~~~~~~
    at https://cdn.esm.sh/v50/xdm@2.0.2/lib/plugin/recma-stringify.d.ts:20:101

TS2694 [ERROR]: Namespace '"https://cdn.esm.sh/v50/estree-jsx@0.0.1/dist/index.d.ts"' has no exported member 'JSXNamespacedName'.
export type JSXNamespacedName = import('https://cdn.esm.sh/v50/estree-jsx@0.0.1/dist/index.d.ts').JSXNamespacedName
                                                                                                  ~~~~~~~~~~~~~~~~~
    at https://cdn.esm.sh/v50/xdm@2.0.2/lib/plugin/recma-stringify.d.ts:21:99

TS2694 [ERROR]: Namespace '"https://cdn.esm.sh/v50/estree-jsx@0.0.1/dist/index.d.ts"' has no exported member 'JSXOpeningFragment'.
export type JSXOpeningFragment = import('https://cdn.esm.sh/v50/estree-jsx@0.0.1/dist/index.d.ts').JSXOpeningFragment
                                                                                                   ~~~~~~~~~~~~~~~~~~
    at https://cdn.esm.sh/v50/xdm@2.0.2/lib/plugin/recma-stringify.d.ts:23:100

TS2694 [ERROR]: Namespace '"https://cdn.esm.sh/v50/estree-jsx@0.0.1/dist/index.d.ts"' has no exported member 'Node'.
  write: (code: string, node?: import('https://cdn.esm.sh/v50/estree-jsx@0.0.1/dist/index.d.ts').Node | undefined) => void
                                                                                                 ~~~~
    at https://cdn.esm.sh/v50/xdm@2.0.2/lib/plugin/recma-stringify.d.ts:29:98

TS2694 [ERROR]: Namespace '__' has no exported member 'Program'.
      import('https://cdn.esm.sh/v50/@types/estree@0.0.50/index.d.ts').Program,
                                                                       ~~~~~~~
    at https://cdn.esm.sh/v50/xdm@2.0.2/lib/plugin/recma-jsx-rewrite.d.ts:15:72

TS2694 [ERROR]: Namespace '__' has no exported member 'Program'.
      import('https://cdn.esm.sh/v50/@types/estree@0.0.50/index.d.ts').Program
                                                                       ~~~~~~~
    at https://cdn.esm.sh/v50/xdm@2.0.2/lib/plugin/recma-jsx-rewrite.d.ts:16:72

TS2694 [ERROR]: Namespace '"https://cdn.esm.sh/v50/estree-jsx@0.0.1/dist/index.d.ts"' has no exported member 'Expression'.
export type Expression = import('https://cdn.esm.sh/v50/estree-jsx@0.0.1/dist/index.d.ts').Expression
                                                                                           ~~~~~~~~~~
    at https://cdn.esm.sh/v50/xdm@2.0.2/lib/plugin/recma-jsx-rewrite.d.ts:18:92

TS2694 [ERROR]: Namespace '"https://cdn.esm.sh/v50/estree-jsx@0.0.1/dist/index.d.ts"' has no exported member 'Function'.
export type ESFunction = import('https://cdn.esm.sh/v50/estree-jsx@0.0.1/dist/index.d.ts').Function
                                                                                           ~~~~~~~~
    at https://cdn.esm.sh/v50/xdm@2.0.2/lib/plugin/recma-jsx-rewrite.d.ts:19:92

TS2694 [ERROR]: Namespace '"https://cdn.esm.sh/v50/estree-jsx@0.0.1/dist/index.d.ts"' has no exported member 'ImportSpecifier'.
export type ImportSpecifier = import('https://cdn.esm.sh/v50/estree-jsx@0.0.1/dist/index.d.ts').ImportSpecifier
                                                                                                ~~~~~~~~~~~~~~~
    at https://cdn.esm.sh/v50/xdm@2.0.2/lib/plugin/recma-jsx-rewrite.d.ts:20:97

TS2694 [ERROR]: Namespace '"https://cdn.esm.sh/v50/estree-jsx@0.0.1/dist/index.d.ts"' has no exported member 'JSXMemberExpression'.
export type JSXMemberExpression = import('https://cdn.esm.sh/v50/estree-jsx@0.0.1/dist/index.d.ts').JSXMemberExpression
                                                                                                    ~~~~~~~~~~~~~~~~~~~
    at https://cdn.esm.sh/v50/xdm@2.0.2/lib/plugin/recma-jsx-rewrite.d.ts:23:101

TS2694 [ERROR]: Namespace '"https://cdn.esm.sh/v50/estree-jsx@0.0.1/dist/index.d.ts"' has no exported member 'JSXNamespacedName'.
export type JSXNamespacedName = import('https://cdn.esm.sh/v50/estree-jsx@0.0.1/dist/index.d.ts').JSXNamespacedName
                                                                                                  ~~~~~~~~~~~~~~~~~
    at https://cdn.esm.sh/v50/xdm@2.0.2/lib/plugin/recma-jsx-rewrite.d.ts:24:99

TS2694 [ERROR]: Namespace '"https://cdn.esm.sh/v50/estree-jsx@0.0.1/dist/index.d.ts"' has no exported member 'ModuleDeclaration'.
export type ModuleDeclaration = import('https://cdn.esm.sh/v50/estree-jsx@0.0.1/dist/index.d.ts').ModuleDeclaration
                                                                                                  ~~~~~~~~~~~~~~~~~
    at https://cdn.esm.sh/v50/xdm@2.0.2/lib/plugin/recma-jsx-rewrite.d.ts:25:99

TS2694 [ERROR]: Namespace '"https://cdn.esm.sh/v50/estree-jsx@0.0.1/dist/index.d.ts"' has no exported member 'Program'.
export type Program = import('https://cdn.esm.sh/v50/estree-jsx@0.0.1/dist/index.d.ts').Program
                                                                                        ~~~~~~~
    at https://cdn.esm.sh/v50/xdm@2.0.2/lib/plugin/recma-jsx-rewrite.d.ts:26:89

TS2694 [ERROR]: Namespace '"https://cdn.esm.sh/v50/estree-jsx@0.0.1/dist/index.d.ts"' has no exported member 'Property'.
export type Property = import('https://cdn.esm.sh/v50/estree-jsx@0.0.1/dist/index.d.ts').Property
                                                                                         ~~~~~~~~
    at https://cdn.esm.sh/v50/xdm@2.0.2/lib/plugin/recma-jsx-rewrite.d.ts:27:90

TS2694 [ERROR]: Namespace '"https://cdn.esm.sh/v50/estree-jsx@0.0.1/dist/index.d.ts"' has no exported member 'Statement'.
export type Statement = import('https://cdn.esm.sh/v50/estree-jsx@0.0.1/dist/index.d.ts').Statement
                                                                                          ~~~~~~~~~
    at https://cdn.esm.sh/v50/xdm@2.0.2/lib/plugin/recma-jsx-rewrite.d.ts:28:91

TS2694 [ERROR]: Namespace '"https://cdn.esm.sh/v50/estree-jsx@0.0.1/dist/index.d.ts"' has no exported member 'VariableDeclarator'.
export type VariableDeclarator = import('https://cdn.esm.sh/v50/estree-jsx@0.0.1/dist/index.d.ts').VariableDeclarator
                                                                                                   ~~~~~~~~~~~~~~~~~~
    at https://cdn.esm.sh/v50/xdm@2.0.2/lib/plugin/recma-jsx-rewrite.d.ts:29:100

Found 38 errors.

Additional info

ije commented 3 years ago

types again 🤣

talentlessguy commented 3 years ago

found the reason why it crashes, estree-jsx is deprecated and types have moved to another package

https://www.npmjs.com/package/estree-jsx

and looks like xdm uses @types/estree-jsx but imports are still estree-jsx (cuz @types pkg defines modules like that)

talentlessguy commented 3 years ago

it now crashes not because of types but because of micromark?

$ deno eval 'import { compile } from \'https://esm.sh/xdm\''
error: Uncaught SyntaxError: The requested module '/v53/micromark@3.0.5/deno/lib/compile.js' does not provide an export named 'compile'
    at <anonymous> (https://cdn.esm.sh/v53/micromark@3.0.5/deno/lib/preprocess.js:2:8)
talentlessguy commented 1 year ago

It works now