embla-carousel: [Bug]: `embla-carousel-docs` gatsby build errors in Windows 10
Bug is related to
- embla-carousel-docs (documentation)
- embla-carousel-docs (generator)
Embla Carousel version
v8.0.0-rc15
Describe the bug
- Running
yarn buildin a windows 10 machine throws 3 errors in a row originating from gatsby in theembla-carousel-docspackage. The 3 errors are mentioned here
CodeSandbox
N/A
Steps to reproduce
- Make sure you’re in a Windows 10 machine (my build is 19045.3086)
- Clone this repository
- Run
yarn installin the root directory - Run
yarn buildin the root directory - See the build errors
Expected behavior
The gatsby docs should build without an errors so that you can run yarn start afterwards to see the documentation site in localhost:8000
Additional context
node version: v18.19.0
npm version: v10.2.3
yarn version: v3.3.1
I only get this error in my Windows 10 (Build 19045.3086).
This issue does not exist in unix-based environments.
About this issue
- Original URL
- State: open
- Created 6 months ago
- Comments: 20 (19 by maintainers)
Ok so I upgraded gatsby to the following versions:
5.6.05.7.05.8.05.9.05.10.05.11.05.12.05.13.0And each time I ran the commands
yarn installandyarn workspace embla-carousel-docs run buildfrom the root directory and got the following error: (from each of the versions listed)And just for good measure I went back to gatsby
5.5.0to see which error and it showed me the old errors mentioned hereI think this is a good sign, it seems all gatsby versions
5.6.0and higher show one error that’s different from the errors coming from gatsby version5.5.0Hi @davidjerleke,
I also haven’t used Astro before but I’m planning to learn it since it’s becoming the go-to for static sites and a lot of people recommended it to me, Although the Astro path I’m planning to learn is CMS-based rather than MDX-based.
I’ve only recommended Astro because I’ve seen a lot of open-source projects use Astro for their MDX-based documentation.
However, I’d definitely recommend NextJS, It’s my favorite framework. Although there’s an on-going debate regarding the pages vs. app routers (the biggest con of the pages router is that it will eventually be deprecated 😅).
In the documentation of my UI kit I used the same nextjs docs setup used by shadcn/ui here. Although they’re using contentlayer which unfortunately seems to be unmaintained at this point in time.
There’s also Nextra, which is easy to setup and get started with the MDX side of things. But I worry it might start causing you trouble when you go deeper and try to customize things that could potentially conflict with Nextra. Note: Nextra is currently working on v3 here (related PR) So expect breaking changes when they upgrade to v3.
The best course of action at this point might be to start a fresh next.js project, unless you have another plan in mind. In all cases, let me know if you need any help. Best of luck brother 👍
@zaaakher thank you for your additional efforts! And please, if I tag you in an issue, no strings attached. Just answer if you want to help out and if you have time.
I think we’re making progress even though we haven’t solved this yet, because at least both you and @TheMikeyRoss are getting the same errors now!
The build problem on OSX was related to a simple syntax thing. Both the syntax that threw the error and the syntax that fixed it are actually valid, but for some reason
graphqlcouldn’t handle one of the syntaxes.Anyway, thanks a ton!
Best, David
Hey @davidjerleke ,
yarn installyarn buildand I unfortunately got the same error as this and this one by @TheMikeyRossI’ve been quite busy lately and now looking back to this error I’m just thankful it’s from the docs and not the actual consumable package. So the only people who’d face it are developers trying to contribute to the docs while in Windows 😅
Update
So I decided to delete the file mentioned in the error message (
api/options.mdx) just to see if the build command will succeed without that file. But the build command failed again because of another file so I kept deleting the file mentioned in the error everytime it fails a build and I ended up deleting the following files in this order (each file deleted is from a failed build caused by that file allegedly)api/options.mdxexamples/predefined.mdxget-started/index.mdxguides/slide-container.mdget-started/modules.mdxapi/methods.mdxexamples/generator.mdxget-started/react.mdxguides/index.mdxAnd at this point it kept pointing at a different mdx/md file every time the build fails so I’m pretty sure the cause is not the content of these mdx/md files but rather the way it’s being built.
Take your time, no rush, no pressure. 👍
I’m just trying to get closer to the source of the error so that it’s easier for you to solve once you get around it
@TheMikeyRoss Our OS are basically identical except mine is Windows 10 Pro and not Home
The error is likely coming from
gatsby:buildIm getting a similar issue when running
yarn buildHere the error
and my pc info is