2

enter image description here I get this error that Module "contentlayer/generated" and its corresponding type declarations are not found.

Solution please .I have installed and updated the dependencies,if someone had the same problem and how the solution

vimuth
  • 5,064
  • 33
  • 79
  • 116

2 Answers2

0

In package.json, I updated scripts to: "dev": "contentlayer dev & next dev",

You can read more in depth about this issue here: https://github.com/contentlayerdev/contentlayer/issues/415

user209245
  • 41
  • 3
0

https://www.contentlayer.dev/docs/getting-started-cddd76b7#3-add-site-code

Notice that you'll get an error when trying to import from contentlayer/generated, it's normal but we're going to fix it later by running the development server.

as the name indicating, it's generated. you need to run npm run dev or npm run build to make contentlayer generating files in the .contentlayer/generated folder.

linxie
  • 1,849
  • 15
  • 20