rcdexta / react-trello

Pluggable components to add a kanban board to your application
https://rcdexta.com/react-trello/
MIT License
2.2k stars 484 forks source link

Unhandled Rejection (TypeError): (0 , _styledComponents.createGlobalStyle) is not a function #452

Open GusMartins499 opened 3 years ago

GusMartins499 commented 3 years ago

Hi, i'm try to install react-trello, but i got a error when i run yarn start

I installed with yarn: $ yarn add react-trello

image

Package.json: "react": "^16.12.0"

code:


import React from 'react';
import Board from 'react-trello';

const Trello = () => {
  const data = {
    lanes: [
      {
        id: 'lane1',
        title: 'Planned Tasks',
        label: '2/2',
        cards: [
          {
            id: 'Card1',
            title: 'Write Blog',
            description: 'Can AI make memes',
            label: '30 mins',
            draggable: false,
          },
          {
            id: 'Card2',
            title: 'Pay Rent',
            description: 'Transfer via NEFT',
            label: '5 mins',
            metadata: { sha: 'be312a1' },
          },
        ],
      },
      {
        id: 'lane2',
        title: 'Completed',
        label: '0/0',
        cards: [],
      },
    ],
  };

  return <Board data={data} />;
};

export default Trello;

```jsx

Somebody can help-me ?

PS: I'm not fluent english yet
OtShellNick commented 3 years ago

I also ran into this problem. Solved by installing the module npm i styled-components --save in my dependencies

TiagoAndreAlmeida commented 2 years ago

I was running a missing context by styled-componets as well. installing styled as dependencies solved.