Skip to content
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

Gatsby Build not completing when upgrading to 9.0.0 #83

Open
xaviemirmon opened this issue Jul 13, 2022 · 3 comments
Open

Gatsby Build not completing when upgrading to 9.0.0 #83

xaviemirmon opened this issue Jul 13, 2022 · 3 comments

Comments

@xaviemirmon
Copy link

xaviemirmon commented Jul 13, 2022

First off thanks for this amazing starter @gregberge! it's really helped me get a docs site up quickly.

🐛 Bug Report

I've run into an issue if I upgrade Smooth Docs to v9. When running gatsby build I get the following error:

Screenshot 2022-07-13 at 10 25 59

I've done some debugging myself and narrowed it down to the following in gatsby-config.js:57

topLevelImportPaths: ['@xstyled/styled-components'],

If I remove this, it builds as expected albeit without some of the overridden styles. I don't know if this is a smooth-docs or xstyled issue so please let me know if I should raise this as an issue against xstyled instead.

To Reproduce

Steps to reproduce the behavior:

Upgrade smooth-doc to ^9.0.0

Expected behavior

Gatsby to build without errors.

Link to repl or repo (highly encouraged)

Repro repo - https://github.com/xaviemirmon/smooth-doc-compile-error-repro

Run npx envinfo --system --binaries --npmPackages smooth-doc,gatsby,react,react-dom --markdown --clipboard

## System:
 - OS: macOS 12.4
 - CPU: (10) arm64 Apple M1 Pro
 - Memory: 276.89 MB / 16.00 GB
 - Shell: 5.8.1 - /bin/zsh
## Binaries:
 - Node: 16.15.0 - /usr/local/bin/node
 - Yarn: 1.22.19 - ~/.yarn/bin/yarn
 - npm: 8.11.0 - /usr/local/bin/npm
## npmPackages:
 - gatsby: ^4.18.0 => 4.18.0 
 - react: ^18.2.0 => 18.2.0 
 - react-dom: ^18.2.0 => 18.2.0 
 - smooth-doc: ^9.0.0 => 9.0.0 
@shaneajeffery
Copy link

shaneajeffery commented Jul 24, 2022

@gregberge Same issue here. Any thoughts on a fix? Trying to get this working with the latest version of Gatsby 4.

@xaviemirmon
Copy link
Author

@gregberge any guidance on this? I have a docs site that I can't launch and I'd really like to get it up and running if possible.

@gregberge
Copy link
Owner

This is a bug in babel-plugin-styled-components, please fix it to v2.0.2. I don't have time right now to fix it in the babel plugin, if someone want to do it feel free. For now add in your package.json:

"overrides": {
  "babel-plugin-styled-components": "2.0.2"
}

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants