Can't Resolve '.contentlayer/data'
See original GitHub issueDescription
I am looking to contribute to the Chakra Documentation, though I am running into the following error when spinning up the local server and attempt to navigate to any documentation page (Or selecting “Get Started” link on the landing page):
wait - compiling /_error (client and server)...
error - ./pages/docs/[[...slug]].tsx:1:0
Module not found: Can't resolve '.contentlayer/data'
> 1 | import { allDocs } from '.contentlayer/data'
2 | import type { Doc } from '.contentlayer/types'
3 | import { MDXComponents } from 'components/mdx-components'
4 | import { GetStaticPaths, GetStaticProps } from 'next'
The following steps to reach to this error:
- Fork
chakra-ui/chakra-ui-docs
- Clone the fork to local
- Run
yarn
to install dependecies - Run
yarn dev
to run local server - Select the "Get Started " link on the landing page or query to a doc page in the address bar (i.e.
http://localhost:3000/docs/disclosure/accordion
)
I am noticing that both .contentlayer/data
and .contentlayer/types
show empty exports.
Also, the CONTRIBUTION
files at the root and in the docs
folder do not appear to be consistent in how to set up the local space for a PR.
Issue Analytics
- State:
- Created 2 years ago
- Comments:7 (3 by maintainers)
Top Results From Across the Web
Contentlayer turns your content into data - GitHub
Contentlayer is a content SDK that validates and transforms your content into type-safe JSON data you can easily import into your application's pages....
Read more >How to setup Contentlayer in your Next.js app?
Contentlayer turns your content into data - making it super easy to import MD(X) and CMS content in your app. Automatic Setup. The...
Read more >Build a MDX-powered blog with Contentlayer and Next
In this article, we'll learn how to use Next.js and Contentlayer to create a static MDX blogging site in this tutorial.
Read more >contentlayer: Versions - Openbase
When using source-files as the content source, you can now use an image field. This will process images that are colocated with your...
Read more >Fixed div inside div with other div scrolling - Stack Overflow
try this: .contentlayer { text-align: center; } .innerlayer { animation: fadein 2s; position: fixed; left: 50%; top: 50%; ...
Read more >
Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free
Top Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Ran
yarn dev
and the docs are now successfully rendering. Thank you!Hello @TylerAPfledderer! I can’t seem to reproduce this issue. Did you try removing the
node_modules
and.contentlayer
folders and running theyarn
command again? Also, what version of node are you using?As for the contribution guide, I’ve synced up the contents, feel free to pull from
main
.