Sortable icon indicating copy to clipboard operation
Sortable copied to clipboard

[bug]

Open jsenosiain opened this issue 2 years ago • 5 comments

Storybook v6.5.8 generates errors when using react-sortablejs component

in ./node_modules/react-sortablejs/dist/index.js 160:55 Module parse failed: Unexpected token (160:55) You may need an appropriate loader to handle this file type, currently no loaders are configured to process this file. See https://webpack.js.org/concepts#loaders

| };
| class $7fe8e3ea572bda7a$export$11bbed9ee0012c13 extends (0, $8zHUo$react.Component) {
>     /* eslint-disable-next-line */ static defaultProps = {
|         clone: (item)=>item
|     };

this only started occuring when Storybook was upgraded from v6.4 to 6.5. I believe the issues is related to React v18 release.

sortablejs = ^1.15.0 @types/sortablejs = ^1.13.0

Additional context @storybook/react: ^6.5.8

jsenosiain avatar Jun 13 '22 18:06 jsenosiain

hi, I have the same problem. how to solve it ?

oneal32 avatar Jul 08 '22 03:07 oneal32

hi, I have the same problem. how to solve it ?

I fixed the problem by downgrading to react-sortablejs v6.1.1 & sortablejs v1.14.

npm i --save-dev @types/sortablejs npm i [email protected] npm i --save [email protected]

seanemery1 avatar Jul 21 '22 18:07 seanemery1

This issue still persists. I need to work with 6.1.4 because I'm already using react 18.

Do you have any solution for this besides downgrading to react-sortablejs 6.1.1?

Thanks

manuelsambade avatar Aug 12 '22 13:08 manuelsambade

I'm also having this issue, can't downgrade to v6.1.1 because am using React 18. Are there any other solutions?

Looks like there is a PR for this - https://github.com/SortableJS/react-sortablejs/pull/247 When might it be merged and released?

FreddieHoy avatar Nov 10 '22 09:11 FreddieHoy

Facing the same issue any fixes?

abubakarzahid07 avatar Mar 09 '23 12:03 abubakarzahid07