question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Error: Cannot find package 'next-mdx-remote' in Next.js 12 environment

See original GitHub issue

Hi! I’m creating a personal engineering blog using Next.js and next-mdx-remote and yarn-berry.

But trying to render mdx using next-mdx-remote caused an error called Error: Cannot find package 'next-mdx-remote'.

I tried to change it to pakcage.json>type: 'module' and reinstall the package, but it was not resolved, so I left it as an issue.

Below is my development environment. Please refer to it. I want you to give me feedback on what I’m doing wrong. Also, yarn-berry version is 3.1.1.

image

I don’t know if it’ll help, but I’ll also attach an error message.

image

Issue Analytics

  • State:open
  • Created 2 years ago
  • Comments:12 (3 by maintainers)

github_iconTop GitHub Comments

1reaction
max-podcommented, Feb 22, 2022

Could you replicate the error in a public repo?

0reactions
fiik346commented, Nov 17, 2022

I have same issue, but when i re-run the command yarn dev the problem has solved.

Read more comments on GitHub >

github_iconTop Results From Across the Web

Advanced Features: Using MDX - Next.js
The @next/mdx package is configured in the next.config.js file at your projects root. It sources data from local files, allowing you to create...
Read more >
next-mdx-remote - npm
Start using next-mdx-remote in your project by running `npm i ... TypeScript icon, indicating that this package has built-in type ...
Read more >
Next.js MDX blog post not building due to module not found ...
My Next.js project is failing to build on Vercel. ... ./components/Blog/BlogAuthor/BlogAuthor.tsx:1:20 Type error: Cannot find module '../.
Read more >
Migrating this Blog to Next.js from Gatsby
I did not have any imports of other TS or JS files in my MDX, only a few static imports for Videos, etc....
Read more >
Read and render MD files with Next.js and Nx
js to read files from the file system, parse the Markdown, and render it to HTML. In particular, we're going to see how...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found