Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

ERR! Module not found: Error: Can't resolve 'prettier/standalone' in '/node_modules/@whitespace/storybook-addon-html/dist/esm' #95

Closed
dekisha opened this issue Feb 8, 2023 · 7 comments

Comments

@dekisha
Copy link

dekisha commented Feb 8, 2023

Hi there! I've started getting this error with the latest version of "@whitespace/storybook-addon-html": "^5.1.1",

Can someone assist please? Do I need to add another dependency for it?

Thanks!

@jeanfredrik
Copy link
Member

Hi dekisha,
Did you install Prettier as well? See the Getting started section in the readme.

@dekisha
Copy link
Author

dekisha commented Feb 16, 2023

Hi jeanfredrik,
Yes, I have prettier package installed but is version 1.19.1. I'll try updating it to latest version and see if this error goes away. Will get back to you soon.

@joz-cti
Copy link

joz-cti commented Mar 10, 2023

I have updated prettier to 2.8.4 and I still get the following error when running npm install

ERR! ModuleNotFoundError: Module not found: Error: Can't resolve 'react-syntax-highlighter/dist/esm/styles/hljs/github-gist'

The only way to get past this error is by removing "@whitespace/storybook-addon-html": "^5.0.0", from package.json

If it helps I am on OSX, m1 mac.

@jeanfredrik
Copy link
Member

@joz-cti
Did you also add react-syntax-highlighter as a dependency?

@joz-cti
Copy link

joz-cti commented Mar 10, 2023

Yup, I had to add it on package.json manually.
Any reason why it's not added as a dependency on this package?

@jeanfredrik
Copy link
Member

Seems like the theme github-gist was removed in favor of github in highlight.js v11.0.0. Should be fixed in v5.1.3 now.

@joz-cti
Copy link

joz-cti commented Mar 21, 2023

Thank you @jeanfredrik

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants