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

Bug: styled-components v6で動かない #369

Open
mimokmt opened this issue Jul 20, 2023 · 0 comments
Open

Bug: styled-components v6で動かない #369

mimokmt opened this issue Jul 20, 2023 · 0 comments
Assignees
Labels
bug Something isn't working

Comments

@mimokmt
Copy link
Contributor

mimokmt commented Jul 20, 2023

できる限り詳細に、不具合の内容と再現方法を報告してください

このようなエラーが出る

$ yarn build
yarn run v1.22.19
$ next build
./src/components/Modal.tsx
12:6  Warning: React Hook useEffect has a missing dependency: 'state'. Either include it or remove the dependency array.  react-hooks/exhaustive-deps
info  - Need to disable some ESLint rules? Learn more here: https://nextjs.org/docs/basic-features/eslint#disabling-rules
- info Linting and checking validity of types ..Failed to compile.
./node_modules/@charcoal-ui/styled/src/util.ts:10:10
Type error: Module '"styled-components"' has no exported member 'CSSObject'. Did you mean to use 'import CSSObject from "styled-components"' instead?
   8 | } from '@charcoal-ui/utils'
   9 | import { CharcoalAbstractTheme, EffectType, Key } from '@charcoal-ui/theme'
> 10 | import { CSSObject } from 'styled-components'
     |          ^
  11 | 
  12 | /**
  13 |  * Function used to assert a given code path is unreachable
error Command failed with exit code 1.
info Visit https://yarnpkg.com/en/docs/cli/run for documentation about this command.

v5 -> v6でいくつかの破壊的変更や、 @types/styled-components を使わなくなったりしているのでそのあたりが影響していそう

使用している charcoal および周辺環境

  • @charcoal-ui/styled
  • @charcoal-ui/react
  • @charcoal-ui/react-sandboxあたり?

コード例へのリンク

No response

現在の挙動

No response

期待される挙動

styled-components@^6.0.0で動く、理想としてはstyled-components@^5.0.0でも動く

@mimokmt mimokmt added the bug Something isn't working label Jul 20, 2023
@mimokmt mimokmt self-assigned this Jul 20, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

1 participant