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

Module parse failed: Unexpected token (24:20) #261

Open
Haunth opened this issue Jan 4, 2024 · 1 comment
Open

Module parse failed: Unexpected token (24:20) #261

Haunth opened this issue Jan 4, 2024 · 1 comment

Comments

@Haunth
Copy link

Haunth commented Jan 4, 2024

VM223:1 ./node_modules/axios-retry/dist/esm/index.js 24:20
Module parse failed: Unexpected token (24:20)
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.
    | }
    | export function isSafeRequestError(error) {

if (!error.config?.method) {
| // Cannot determine if the request can be retried
| return false;

When I setup retry-axios . I receive that problem.

Please help me fixed this. Code bellow is that my setup
image

@ThinkingThigh
Copy link

You may try other version like : npm i [email protected] .
My project is about four years ago and its axios version is 0.17.1.
I check the version at https://www.npmjs.com/package/axios-retry?activeTab=versions , v3.1.8 is four years ago and worked.
You can try and find the right axios-retry version for your project.

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

No branches or pull requests

2 participants