Val-istar-Guo / rehype-prism

The unified plugin used to highlight code block in html with Prism
MIT License
12 stars 1 forks source link

rehype-prism@1.0.1 is not available in npmjs #7

Closed evomac closed 2 years ago

evomac commented 2 years ago

Describe the bug When I'm trying to install rehype-prism it says a package version that doesn't exist

To Reproduce Steps to reproduce the behavior:

  1. Go to Terminal
  2. Open project
  3. Write npm install rehype-prism@1.0.1
  4. See error6.

❯ npm install rehype-prism@1.0.1 npm WARN ERESOLVE overriding peer dependency npm WARN While resolving: rehype-prism@1.0.1 npm WARN Found: unified@9.2.0 npm WARN node_modules/unified npm WARN unified@"9.2.0" from @mdx-js/mdx@1.6.22 npm WARN node_modules/@mdx-js/mdx npm WARN @mdx-js/mdx@"^1.6.22" from @web/dev-server-storybook@0.3.7-next.0 npm WARN node_modules/@web/dev-server-storybook npm WARN 1 more (storybook-addon-markdown-docs) npm WARN 1 more (remark-mdx) npm WARN npm WARN Could not resolve dependency: npm WARN peer unified@"^9 | ^10" from rehype-prism@1.0.1 npm WARN node_modules/rehype-prism npm WARN rehype-prism@"1.0.1" from the root project npm WARN ERESOLVE overriding peer dependency npm WARN While resolving: rehype-prism@1.0.1 npm WARN Found: unified@undefined npm WARN node_modules/unified npm WARN npm WARN Could not resolve dependency: npm WARN peer unified@"^9 | ^10" from rehype-prism@1.0.1 npm WARN node_modules/rehype-prism npm WARN rehype-prism@"1.0.1" from the root project npm ERR! code ETARGET npm ERR! notarget No matching version found for unified@^9 | ^10. npm ERR! notarget In most cases you or one of your dependencies are requesting npm ERR! notarget a package version that doesn't exist.

Expected behavior Correctly published pack and build package.json file

Platform (please complete the following information):

msw119822 commented 2 years ago

We are also having. We are having to pin rehype-prism to version 1.0.0 for this to work

daKmoR commented 2 years ago

jup in this commit

the following change happend

  "peerDependencies": {
-    "unified": "^9.2.1"
+    "unified": "^9 | ^10"

while it should be

  "peerDependencies": {
-    "unified": "^9.2.1"
+    "unified": "^9 || ^10"

Note the double ||

Val-istar-Guo commented 2 years ago

what a stupid mistake . -_-||

Val-istar-Guo commented 2 years ago

A new version has been released, upgrade to 1.0.2 and try again.

Val-istar-Guo commented 2 years ago

https://github.com/Val-istar-Guo/rehype-prism/discussions/9

msw119822 commented 2 years ago

The issue is corrected for my team. Thank you.