Contentlayer warning on Windows - Warning: Contentlayer might not work as expected on Windows
After downgrading my Node version to v18 from v20 in order to make the content layer dependency to work, but weirdly it prompts a warning whenever I run the pnpm dev command. Here is what happens:
WARN Unsupported engine: wanted: {"node":">=20.6.1"} (current: {"node":"v18.17.0","pnpm":"9.0.4"})
[email protected] dev C:\Users\USER\Documents\Programming\open-source\magicui next dev
▲ Next.js 14.1.0
- Local: http://localhost:3000
- Environments: .env.local
- Experiments (use at your own risk): · optimizeCss
Warning: Contentlayer might not work as expected on Windows ✓ Ready in 63.8s Contentlayer config change detected. Updating type definitions and data... Warning: Found 23 problems in 49 documents.
└── 23 documents contain field data which didn't match the structure defined in the document type definition. (Skipping documents)
• "docs/changelog.mdx" of type "Doc" has the following incompatible fields:
• published: "false\r"
• "docs/installation.mdx" of type "Doc" has the following incompatible fields:
• published: "true\r"
• "docs/story.mdx" of type "Doc" has the following incompatible fields:
• published: "false\r"
• "docs/components/animated-grid-pattern.mdx" of type "Doc" has the following incompatible fields:
• published: "true\r"
• "docs/components/animated-list.mdx" of type "Doc" has the following incompatible fields:
• published: "true\r"
• "docs/components/avatar-circles.mdx" of type "Doc" has the following incompatible fields:
• published: "true\r"
• "docs/components/bento-grid.mdx" of type "Doc" has the following incompatible fields:
• published: "true\r"
• "docs/components/blur-in.mdx" of type "Doc" has the following incompatible fields:
• published: "true\r"
• "docs/components/box-reveal.mdx" of type "Doc" has the following incompatible fields:
• published: "true\r"
• "docs/components/fade-text.mdx" of type "Doc" has the following incompatible fields:
• published: "true\r"
• "docs/components/flip-text.mdx" of type "Doc" has the following incompatible fields:
• published: "true\r"
• "docs/components/gradual-spacing.mdx" of type "Doc" has the following incompatible fields:
• published: "true\r"
• "docs/components/icon-cloud.mdx" of type "Doc" has the following incompatible fields:
• published: "true\r"
• "docs/components/letter-pullup.mdx" of type "Doc" has the following incompatible fields:
• published: "true\r"
• "docs/components/scroll-based-velocity.mdx" of type "Doc" has the following incompatible fields:
• published: "true\r"
• "docs/components/separate-away.mdx" of type "Doc" has the following incompatible fields:
• published: "true\r"
• "docs/components/shine-border.mdx" of type "Doc" has the following incompatible fields:
• published: "true\r"
• "docs/components/shiny-button.mdx" of type "Doc" has the following incompatible fields:
• published: "true\r"
• "docs/components/typing-animation.mdx" of type "Doc" has the following incompatible fields:
• published: "true\r"
• "docs/components/wavy-text.mdx" of type "Doc" has the following incompatible fields:
• published: "true\r"
• ... 3 more documents (Use the --verbose CLI option to show all documents)
Generated 26 documents in .contentlayer
Can someone please suggest a fix to this?
Contentlayer config change detected. Updating type definitions and data...
Warning: Found 17 problems in 43 documents.
└── 17 documents contain field data which didn't match the structure defined in the document type definition. (Skipping documents)
• "docs/changelog.mdx" of type "Doc" has the following incompatible fields:
• published: "false\r"
This error can be temporarily resolved by changing your Git configuration with the command git config --global core.autocrlf input. Linux and Mac have a different end-of-line system than Windows, so converting to CRLF is causing the error. Setting autocrlf to input will use the end-of-line format as it is in the GitHub repo, which should solve the issue.
However, I recommend re-cloning the entire repo from scratch after changing the settings. Additionally, restart your terminal, code editor, and ideally, your PC or laptop.
should hopefully be resolved with latest commit
closing for now
https://github.com/magicuidesign/magicui/commit/37bc4adb244f18f0042ef3f3d27db23ef21900be