markdown-it / linkify-it

Links recognition library with full unicode support
http://markdown-it.github.io/linkify-it/
MIT License
661 stars 63 forks source link

Error: Namespace 'LinkifyIt' has no exported member 'LinkifyIt' #111

Open Wilkuuu opened 5 months ago

Wilkuuu commented 5 months ago

Error: node_modules/@types/markdown-it/lib/index.d.ts:151:33 - error TS2694: Namespace 'LinkifyIt' has no exported member 'LinkifyIt'. 151 readonly linkify: LinkifyIt.LinkifyIt;

When i try build package i get this error. I think is related with last update (05/01/2024)

Wilkuuu commented 5 months ago

https://github.com/DefinitelyTyped/DefinitelyTyped/issues/69526

KyleSmith0905 commented 3 months ago

I ran pnpm i @types/linkify-it@3.0.5 and it fixed the type safety issue. Not really a great solution, but at least I can build 😀.

NiklasRosenstein commented 2 months ago

Using @types/linkify-it@3.0.5 doesn't seem to work for me.

From my pnpm-lock.yaml:

  /@types/linkify-it@3.0.5:
    resolution: {integrity: sha512-yg6E+u0/+Zjva+buc3EIb+29XEg4wltq7cSmd4Uc2EE/1nUVmxyzpX6gUXD0V8jIrG0r7YeOGVIbYRkxeooCtw==}
    dev: true

  /@types/linkify-markdown@1.0.3:
    resolution: {integrity: sha512-BnuGqDmpzmXCDMXHzgle/vMRUnbFcWclts0+n7Or421exav3XG6efl9gsxamLET6QPhX+pMnxcsHgnAO/daj9w==}
    dev: true

And the error I get from pnpm build is:

#26 17.76 node_modules/.pnpm/@types+markdown-it@13.0.7/node_modules/@types/markdown-it/lib/index.d.ts(153,33): error TS2694: Namespace 'LinkifyIt' has no exported member 'LinkifyIt'.
#26 17.83  ELIFECYCLE  Command failed with exit code 2.
#26 17.84 ERROR: "compile:ts" exited with 1.
#26 17.84  ELIFECYCLE  Command failed with exit code 1.