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] react-tooltip.esm.min.js - Unexpected token #981

Closed
Nagrom33 opened this issue Mar 10, 2023 · 9 comments
Closed

[BUG] react-tooltip.esm.min.js - Unexpected token #981

Nagrom33 opened this issue Mar 10, 2023 · 9 comments
Labels

Comments

@Nagrom33
Copy link

Describe the bug
When I want to run npm run start I'm getting following error.
If you need more information about other packages I'm using let me know.

Version of Package
v5.10.0

Error message


./node_modules/react-tooltip/dist/react-tooltip.esm.min.js 321:11
Module parse failed: Unexpected token (321:11)
File was processed with these loaders:
 * ./node_modules/react-scripts/node_modules/babel-loader/lib/index.js
You may need an additional loader to handle the result of these loaders.
|         }
|       });
>     a = x ?? a, c = v ?? c, p = {
|       ...p,
|       [w]: {

@Nagrom33 Nagrom33 added the Bug label Mar 10, 2023
@Nagrom33
Copy link
Author

Nagrom33 commented Mar 10, 2023

I found an solution but I don't know if this is the good way.
How I fix it:

change browserslist:

"browserslist": [
  ">0.2%",
  "not dead",
  "not op_mini all"
],

This was:

  "browserslist": {
    "production": [
      ">0.2%",
      "not dead",
      "not op_mini all"
    ],
    "development": [
      "last 1 chrome version",
      "last 1 firefox version",
      "last 1 safari version"
    ]
  },

(make sure you don't have special config for development in browserslist)

clear npm cache:
pm cache clean --force

reinstall things:
rm -rf node_modules && rm -f package-lock.json && npm i

Founded from: https://stackoverflow.com/questions/63423384/you-may-need-an-additional-loader-to-handle-the-result-of-these-loaders

@danielbarion
Copy link
Member

Hi, can you try this beta version and let me know if it worked, please?

@danielbarion
Copy link
Member

@Nagrom33 can you try this beta version and let me know if it worked, please?

@jeyang
Copy link

jeyang commented Mar 13, 2023

@danielbarion - getting this issue as well.

[email protected] doesn't fix it, I get the same error.
same for [email protected] and [email protected]

[email protected] works.

@danielbarion
Copy link
Member

@jeyang can you check the thread in this PR, please?

#982

focus on the last 2 messages

@gabrieljablonski
Copy link
Member

gabrieljablonski commented Mar 31, 2023

Sorry for the delay.

Are you able to let us know if using [email protected] without the manual browserlist fix works?

@danielbarion
Copy link
Member

Or the latest release that we did on react-tooltip

@danielbarion
Copy link
Member

cc @jeyang

@gabrieljablonski
Copy link
Member

Closing this since no response from OP. Feel free to reopen if it still doesn't work after testing with the latest version (npm i react-tooltip@latest).

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

Successfully merging a pull request may close this issue.

4 participants