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

ERROR in ./node_modules/react-data-grid/lib/bundle.js 100:16 #2928

Open
msaiducar64 opened this issue May 31, 2022 · 9 comments
Open

ERROR in ./node_modules/react-data-grid/lib/bundle.js 100:16 #2928

msaiducar64 opened this issue May 31, 2022 · 9 comments
Labels

Comments

@msaiducar64
Copy link

Describe the bug

ERROR in ./node_modules/react-data-grid/lib/bundle.js 100:16
Module parse failed: Unexpected token (100:16)
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
| useLayoutEffect(() => {
| if (!isSelected) return;

ref.current?.focus({

| preventScroll: true
| });
Ekran Resmi 2022-05-31 16 41 35

To Reproduce

Link to code example:

Expected behavior

Environment

  • "react-data-grid": "^7.0.0-beta.13",
  • react/react-dom version: "^17.0.1" /"^17.0.1"

Additional context

@purplecones
Copy link

Getting this error as well. To reproduce I simply installed the package into my CRA app and used the code from Quickstart sample.

Screen Shot 2022-06-09 at 12 13 43 PM

"react": "^16.13.1",
"react-dom": "^16.13.1",
"react-data-grid": "^7.0.0-beta.13",

"react-scripts": "4.0.3"

@thegladysadjei
Copy link

Same issue as well. Really critical any help?

@vincaslt
Copy link

Same issue as well. Really critical any help?

Install the previous version, it is only an issue with the latest.

@thegladysadjei
Copy link

thegladysadjei commented Jun 24, 2022

Was able to resolve it. It was an issue with javascript's optional chaining syntax ref.current?.focus({...}). In my case the issue happened when I tried running storybook. The storybook version we were using utilized webpack 4. Had to tell it to use webpack 5.
In your .storybook/main.js add
module.exports = { ... , typescript: { reactDocgen: false //if you're using typescript } core: { builder: 'webpack5' } };

Then had to install these in package.json
@storybook/builder-webpack5 @storybook/manager-webpack5

If your issue is not with storybook, still try upgrading your webpack to webpack5

@ekeuus
Copy link
Contributor

ekeuus commented Jul 1, 2022

It seems to be an issue with the bundling itself somehow as even old releases have this issue for me if I build them locally.

My guess is that probably some package has been upgraded, which somehow has broken the build process/output as well.

With this change it seems to work again and this specific issue is gone.

Screenshot 2022-07-01 at 10 21 13

@rajasekar-mu
Copy link

This issue happening new release as well, any solution to resolve this issue?
image

"react": "^18.1.0", "react-data-grid": "^7.0.0-beta.14", "react-dom": "^18.1.0",

@vincaslt kindly share which previous version working?

@nstokoe
Copy link

nstokoe commented Aug 26, 2022

@vincaslt kindly share which previous version working?

I was able to get this working by downgrading to 7.0.0-beta.12.

+1 to fixing this on all versions greater than 7.0.0-beta.12

@shawncao
Copy link

shawncao commented Dec 4, 2022

I also hit the same issue while trying the latest versions, such as beta-19, and beta-20, does anybody understand what the root cause is? mind share your thoughts please if yes?

@shawncao
Copy link

shawncao commented Dec 4, 2022

It is probably the same issue for everyone, just post for reference, this suggestion worked for me - https://stackoverflow.com/questions/67543182/react-babel-you-may-need-an-additional-loader-to-handle-the-results-of-these

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

No branches or pull requests

8 participants