micromark / micromark-extension-mdx-expression

micromark extension to support MDX or MDX JS expressions
https://unifiedjs.com
MIT License
11 stars 2 forks source link

Type error of `Node` missing from `'estree-util-visit/index'` #8

Closed rognierbenoit closed 1 year ago

rognierbenoit commented 1 year ago

Initial checklist

Affected packages and versions

1.2.0

Link to runnable example

No response

Steps to reproduce

A typescript project using the lib

Expected behavior

Should compile.

Actual behavior

Namespace '".../node_modules/estree-util-visit/index"' has no exported member 'Node'.

23 export type EstreeNode = import('estree-util-visit').Node
                                                        ~~~~

estree-util-visit has no exported 'Node' type.

The solution is to comment the line out ?

Runtime

Node v16

Package manager

npm v7

OS

macOS

Build and bundle tools

Webpack

github-actions[bot] commented 1 year ago

Hi! This was closed. Team: If this was fixed, please add phase/solved. Otherwise, please add one of the no/* labels.

wooorm commented 1 year ago

The solution is to comment the line out ?

No, that is not a solution. Why would you use TypeScript but not want types? That doesn’t make sense.

The solution is either:

remcohaszing commented 1 year ago

That’s what they’re reporting. micromark-extension-mdx-expression imports Node from the wrong place. This is fixed in https://github.com/micromark/micromark-extension-mdx-expression/commit/350fe0bf8d0fae9cf1d619585af87905b692aa5d#diff-862b7cc1d1766f73cb7e1e22ecf87e00ec4a42a5118941f5fd4039844f6abaa0, but it hasn’t been released yet.

Never mind, misread some context.

wooorm commented 1 year ago

Thanks for the report! released a fix: https://github.com/micromark/micromark-extension-mdx-expression/releases