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鈥檒l occasionally send you account related emails.

Already on GitHub? Sign in to your account

Error with importing __DO_NOT_USE_OR_YOU_WILL_BE_HAUNTED_BY_SPOOKY_GHOSTS #37

Closed
daniepetrov opened this issue Jul 8, 2019 · 4 comments

Comments

@daniepetrov
Copy link
Contributor

馃悰 Bug Report

I have that error with importing module "__DO_NOT_USE_OR_YOU_WILL_BE_HAUNTED_BY_SPOOKY_GHOSTS" from styled-components

To Reproduce

During building in Next.js when i run "yarn dev"

Expected behavior

Normal dev run in Next.js

Link to repl or repo (highly encouraged)

https://codesandbox.io/s/ssbed

Run npx envinfo --system --binaries --npmPackages @xstyled/system,@xstyled/styled-components,styled-components --markdown --clipboard

Paste the results here:

## System:
 - OS: Linux 4.19 Debian GNU/Linux 9 (stretch) 9 (stretch)
 - CPU: (8) x64 Intel(R) Core(TM) i7-7700 CPU @ 3.60GHz
 - Memory: 5.59 GB / 62.70 GB
 - Container: Yes
 - Shell: 4.4.12 - /bin/bash
## Binaries:
 - Node: 10.16.0 - /usr/local/bin/node
 - Yarn: 1.16.0 - /usr/local/bin/yarn
 - npm: 6.9.0 - /usr/local/bin/npm
## npmPackages:
 - @xstyled/styled-components: 1.7.0 => 1.7.0
 - @xstyled/system: 1.7.0 => 1.7.0
 - styled-components: 5.0.0-beta.6-ej4 => 5.0.0-beta.6-ej4
@gregberge
Copy link
Collaborator

Hello, you use styled-components v5, it is not yet supported. It will be as soon as it will be officially released.

@daniepetrov
Copy link
Contributor Author

daniepetrov commented Jul 9, 2019

Ok, but it worked pretty well before Next.js update to 9.0.0. In 8.1.0 I have only warning about importing "__DO_NOT_USE_OR_YOU_WILL_BE_HAUNTED_BY_SPOOKY_GHOSTS" module. Seems that in v5 there is no more exporting it from styled.

Simply remove that import:
__DO_NOT_USE_OR_YOU_WILL_BE_HAUNTED_BY_SPOOKY_GHOSTS
from https://github.com/smooth-code/xstyled/blob/master/packages/styled-components/src/index.js do the trick

export {
  isStyledComponent,
  keyframes,
  ServerStyleSheet,
  StyleSheetConsumer,
  StyleSheetContext,
  StyleSheetManager,
  ThemeConsumer,
  ThemeContext,
  ThemeProvider,
  withTheme,
  __DO_NOT_USE_OR_YOU_WILL_BE_HAUNTED_BY_SPOOKY_GHOSTS,
} from 'styled-components'

@gregberge
Copy link
Collaborator

OK thanks! I am interested to know if everything work with styled-components v5. They made a lot of changes and I wasn鈥檛 sure to be compatible. I will remove the export, it should not be used.

@daniepetrov
Copy link
Contributor Author

Yeah, everything works smooth馃憤, we are using your library in combination with v5, they reduced the tree tremendously, it's really a pleasure 馃榾

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

2 participants