-
Notifications
You must be signed in to change notification settings - Fork 51
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Docusaurus build crashes during minification #106
Comments
I can reproduce the error when |
@BuckyMaler Sure. I don't get how docusaurus is resolving the wrong |
@dbrrt I wanted to notify you that we've added contributing docs so that may be helpful as you work on this. Let me know if there's anything I can do to help. |
It seems like an issue with some version of webpack not playing right with Docusaurus. I've created an issue here: facebook/docusaurus#3515 |
Thank you @BuckyMaler @taylorreece. I've started isolating the code and looking into it. I suspect a library coming through webpack responsible for uglyfication |
Hey guys - I have a temporary fix for this. If you Note, after you add that |
@taylorreece Will try it, that's really good to know |
@taylorreece thanks for the additional details, but @dbrrt the issue is that Docusaurus resolves a different version of I hope one of those workarounds help. |
@BuckyMaler I can confirm you that with |
I'm going to leave this issue open for now. Though I think the fix will be a PR in Nx and/or Docusaurus. Here are a couple of workarounds in the meantime. |
Hello! I am running into the same problem but with a different setup. The workarounds above do not work for me.
I am using npm, no Yarn or Yarn workspaces. I am out of ideas here, since the problem has been traced back to using yarn workspaces or @nrwl/web. Weirdly, setting |
@bedoro minify flag doesn't seem to be applied with this plugin. |
I'm having trouble trying to get this workaround to work. I ran the |
@ImCesar Same here. Tried all the suggestions but the error still persists. Really frustrating to not be able to do a production build :( |
@bedoro Do you have a project you can share so that I can try on my side? I'm able to deploy docusaurus app with nx, thanks to this plugin and the |
I was able to replicate the bug here in this repo https://github.com/ImCesar/nx-docusaurus-bug With docusaurus alone it would build and serve fine. I started to add the things that would be in my library, the first one being a buildable and publishable library. That was still fine. Then I added storybook to that library and that's when docusaurus would fail to build. |
Hey @ImCesar , I didn't do a full PR, but for your https://github.com/ImCesar/nx-docusaurus-bug if you apply this patch, you can then Sidenote: not sure why you have a |
Maybe we need to change https://github.com/facebook/docusaurus/blob/69bf68ae575679ff06703cea02a89e3014d39359/packages/docusaurus/package.json#L102 to |
Thanks for the help @taylorreece I have both because I rushed to put the example together. When you generate NX it will create the yarn.lock but we use npm so that generated the package-lock.json. I forgot to clean up the yarn.lock. I got rid of my yarn.lock and installed |
In my actual NX repo I deleted my package-lock, deleted my node_modules, and cleared my cache. Then once I reinstalled it was able to build correctly. I didn't have to explicitly install |
@ImCesar Is there still |
My bad I did misspoke in my message. I double checked and I still have the |
Adding to my package.json |
I'm closing this because it's not a |
Current Behavior
Build process crashes at the end
Expected Behavior
Build process to pass
Steps to Reproduce
This issue may not be prioritized if details are not provided to help us reproduce the issue.
Failure Logs
Environment
Plugin name and version: @nx-plus/docusaurus#8b21c9f
The text was updated successfully, but these errors were encountered: