gucong3000 / postcss-markdown

PostCSS Syntax for parsing Markdown
MIT License
21 stars 10 forks source link

upgrade remark to v11 to fix declaration error #32

Open Chersquwn opened 4 years ago

Chersquwn commented 4 years ago

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'.
XhmikosR commented 4 years ago

@Chersquwn this is a duplicate of #31

pmeller commented 4 years ago

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

{
  "resolutions": {
    "remark": "11.0.2"
  }
}
de-dan commented 4 years ago

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

HHogg commented 4 years ago

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

bobaaaaa commented 4 years ago

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

declare module 'vfile-message' {
  export type VFileMessage = any;
}
rafaelfbs commented 4 years ago

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.

craigbeck commented 4 years ago

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",

NullVoxPopuli commented 4 years ago

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