gucong3000 / postcss-markdown

PostCSS Syntax for parsing Markdown

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

upgrade remark to v11 to fix declaration error

Chersquwn opened this issue · comments

Because of @types/vfile and @types/vfile-message deprecate, the old version of remark depends on @types/vfile-message will report an error, when using ts.

ERROR in [at-loader] ./node_modules/@types/vfile/index.d.ts:11:31 
    TS7016: Could not find a declaration file for module 'vfile-message'.

@Chersquwn this is a duplicate of #31

Possible temporary fix for Yarn users is to define resolutions in package.json:

{
  "resolutions": {
    "remark": "11.0.2"
  }
}

Could you provide a new release with the updated remark dependency? Thank you!

@gucong3000 Please publish the new version. postcss-markdown is currently the point of failure for a lot typescript builds.

I added the following workaround to my custom-types.d.ts (project root file):

declare module 'vfile-message' {
  export type VFileMessage = any;
}

Sadly, we don't have a new release. 😞

As a fix to vfile-message error, in my case, I just added "moduleResolution": "node" to tsconfig.json.

As a fix to vfile-message error, in my case, I just added "moduleResolution": "node" to tsconfig.json.

@rafaelfbs new to typescript here, care to share example of what you added? we already have in tsconfig "moduleResolution": "node",

any chance we'll get this fixed? it's almost been a year