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

NextJS 13 - "Module not found" #561

Closed
ezeamin opened this issue Aug 7, 2023 · 2 comments
Closed

NextJS 13 - "Module not found" #561

ezeamin opened this issue Aug 7, 2023 · 2 comments

Comments

@ezeamin
Copy link

ezeamin commented Aug 7, 2023

When I try to run the editor, without any other extra config, I get this error:

- error ./node_modules/@uiw/react-markdown-preview/lib/index.js:20:0
Module not found: Package path . is not exported from package /workspace/node_modules/rehype-prism-plus (see exports field in /workspace/node_modules/rehype-prism-plus/package.json)

https://nextjs.org/docs/messages/module-not-found

Import trace for requested module:
./node_modules/@uiw/react-md-editor/lib/Editor.js
./node_modules/@uiw/react-md-editor/lib/index.js
./components/Editor.tsx

Link to the codesandbox

@jaywcjlove
Copy link
Member

jaywcjlove commented Aug 7, 2023

@ezeamin Remove the node_modules and package-lock.json directories and reinstall dependencies.

$ rm -rf node_modules package-lock.json
$ npm install

Locked the version of the problematic package rehype-prism-plus

github-actions bot added a commit to uiwjs/react-markdown-preview that referenced this issue Aug 7, 2023
@jaywcjlove
Copy link
Member

@ezeamin ezeamin closed this as completed Aug 7, 2023
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

2 participants