typescript-plugin-styled-componentsでSyntheticEvent.extend.withConfig is not a functionのエラーで動かない

プログラミング

TypeScript x React x Styled-Componentをやろうと思って typescript-plugin-styled-componentsをいれていたら

react-dom.development.js:1580 Uncaught TypeError: SyntheticEvent.extend.withConfig is not a function
    at eval (react-dom.development.js:1580)
    at eval (react-dom.development.js:4128)
    at Object../node_modules/react-dom/cjs/react-dom.development.js (bundle.js:127)
    at t (bundle.js:1)
    at eval (index.js:31)
    at Object../node_modules/react-dom/index.js (bundle.js:129)
    at t (bundle.js:1)
    at eval (main.tsx:10)
    at Module../src/frontend/main.tsx (bundle.js:155)
    at t (bundle.js:1)

のエラーがでた

package.jsonを修正してバージョンを1.0.0に落とすと動く

    "typescript-plugin-styled-components": "^1.4.4",
...
    "typescript-plugin-styled-components": "1.0.0",

styled.keyframes.withConfig is not a function · Issue #216 · styled-components/babel-plugin-styled-components
Reopening #213 as I'm still experiencing this issue despite the suggestion provided. I'm using v3.4.10 of styled-components and v1.10.0 of babel-plugin-...

コメント

タイトルとURLをコピーしました