You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I searched issues and couldn’t find anything (or linked relevant results below)
Affected packages and versions
remark-inline-links@6.0.1
Link to runnable example
No response
Steps to reproduce
Install latest remark and remark-inline-links.
Use the remark-inline-links plugin.
Run tsc and see the error.
Expected behavior
Node type error reported.
Actual behavior
Type 'Root' is not assignable to type 'Node<Data>'.
Types of property 'data' are incompatible.
Type 'import("/Users/mirone/Code/milkdown-repos/milkdown/node_modules/.pnpm/@types+unist@3.0.0/node_modules/@types/unist/index").Data | undefined' is not assignable to type 'import("/Users/mirone/Code/milkdown-repos/milkdown/node_modules/.pnpm/@types+unist@2.0.6/node_modules/@types/unist/index").Data | undefined'.
Runtime
Node v16
Package manager
pnpm
OS
macOS
Build and bundle tools
No response
The text was updated successfully, but these errors were encountered:
This issue is caused by @types/mdast depending on @types/unist@*. Unfortunately DefinitelyTyped uses * dependency ranges. This issue exists now that we're in the process of updating all packages in the unified ecosystem.
You can solve the issue using npm resolutions or yarn overrides in package.json.
{
// for npm
"resolutions": {
"@types/node": "2"
},
// for yarn
"overrides": {
"@types/node": "2"
}
}
For pnpm there may be a similar solution, but I'm not sure what. Nite that this is a temporary workaround. The issue should resolve itself later.
The issue is about mdast@6 (which does not exist, but presumably refers to @types/mdast@4).
That version does not work with this project. Or most projects.
The solution is to not yet use @types/mdast@4.
If you do use @types/mdast@3, and if that does fail on @types/unist, then the override solution provided by @remcohaszing does the trick. But please note that the code needed is:
{
// for npm
"resolutions": {
"@types/unist": "2"
},
// for yarn
"overrides": {
"@types/unist": "2"
}
}
Closing because all projects have these problems. And we’re in the process to update everything. It isn’t useful to track it in individual projects.
Initial checklist
Affected packages and versions
remark-inline-links@6.0.1
Link to runnable example
No response
Steps to reproduce
tsc
and see the error.Expected behavior
Node type error reported.
Actual behavior
Runtime
Node v16
Package manager
pnpm
OS
macOS
Build and bundle tools
No response
The text was updated successfully, but these errors were encountered: