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] Failed to compile. #244

Open
sajera opened this issue Jul 13, 2022 · 15 comments · May be fixed by #246 or #247
Open

[bug] Failed to compile. #244

sajera opened this issue Jul 13, 2022 · 15 comments · May be fixed by #246 or #247

Comments

@sajera
Copy link

sajera commented Jul 13, 2022

Failed to compile.

To Reproduce
npm i react-sortablejs

Expected behavior
All work fine

Information
image

Versions - Look in your package.json for this information:
react-sortable = ^6.1.4
react = ^16.13.1

Additional context

I'm submitting a bug report

Webpack Version:
4.44.1

Babel Core Version:
7.4.5

Babel Loader Version:
8.0.6

Please tell us about your environment:
OSX 12.4

@eeve
Copy link

eeve commented Jul 18, 2022

same problem

1 error found.

ERROR in ./node_modules/.pnpm/[email protected]_n44kum6kqnww4ip7bq4mbkucqa/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
|     };

@arigon
Copy link

arigon commented Jul 18, 2022

It's part of SortableJS: SortableJS/Sortable#2167

@izhangchao
Copy link

same problem!how to resolve it?

@eeve
Copy link

eeve commented Jul 21, 2022

fallback to version 6.1.1

@seanemery1
Copy link

seanemery1 commented Jul 21, 2022

downgrading to react-sortablejs v6.1.1 worked for me!

@LeonBlade
Copy link

We have this issue as well. Are there any plans on resolving this to use future version of this library? Thank you.

@manuelsambade
Copy link

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 6.1.1?

Thanks

welcomemax added a commit to welcomemax/react-sortablejs that referenced this issue Aug 31, 2022
@welcomemax
Copy link

You need to add .babelrc to compile class props during build

  {
    "plugins": ["@babel/plugin-proposal-class-properties"]
  }

I can’t build and check anything locally because you have complete chaos with dependencies (lock file is absolutely required)

@welcomemax welcomemax linked a pull request Aug 31, 2022 that will close this issue
welcomemax added a commit to welcomemax/react-sortablejs that referenced this issue Sep 1, 2022
@welcomemax
Copy link

Dealt with versions and build (lock file is absolutely required)

Please see the new PR - #247

@pokroman
Copy link

pokroman commented Sep 1, 2022

Same problem!!! Please, resolve it as soon as possible!

@welcomemax
Copy link

Any update? Or the project is not maintained anymore? Looks like we're should migrate to beautiful-dnd)

@giabao2000
Copy link

giabao2000 commented Mar 9, 2023

Reference: https://polotno.com/docs/non-react-integration
npm install parcel polotno react react-dom

I try to install polotno in nuxt 2 project but error Failed to compile

Please, help me! Thanks

"canvas": "^2.11.0",
"nuxt": "^2.15.8",
"parcel": "^2.8.3",
"polotno": "^1.7.5",
"react": "^18.2.0",
"react-dom": "^18.2.0",
"react-sortablejs": "^6.1.1",
"sortablejs": "^1.15.0",

image

@andy7076
Copy link

same issue +1

1 similar comment
@yangJinRui325
Copy link

same issue +1

@andreichirkov
Copy link

Downgrading to 6.1.1 worked!
✅ "react-sortablejs": "6.1.1"
❌ "react-sortablejs": "^6.1.1"

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet