node.jsnpmbunreact-markdown

No version matching "^11.0.0" found for specifier "remark-rehype" (but package exists)


I tried to install react-markdown using bun. But I get the following error:

$ bun i react-markdown
bun add v1.1.20 (ae194892)                                              
error: No version matching "^11.0.0" found for specifier "remark-rehype" (but package exists)
error: remark-rehype@^11.0.0 failed to resolve

I'm new to node.js and bun. I switched from npm to bun.


Solution

  • Try using the following command:

    bun pm cache rm
    bun install react-markdown
    

    Sometimes the caching of bun causes this problem.

    bun pm cache rm clears the bun cache.