Impossible to use Axios 0.27.0 with React
See original GitHub issueDescribe the bug
I’m trying to install Axios 0.27.0 with React,  but when I run npm start I get this error:
Module not found: Error: Can't resolve 'url' in '/path/to/node_modules/axios/lib/adapters'
To Reproduce
Run npm i axios in your terminal, and npm start, and then in your App.js:
import axios from "axios"
Expected behavior
App running normally
Environment
- Axios Version [0.27.0]
- Adapter [e.g. XHR/HTTP]
- Browser [Chrome]
- Browser Version [100.0.4896.127]
- Node.js Version [16.13.1]
- OS: [macOS 12.3.1]
- Additional Library Versions [React 18.0.0]
Additional context/Screenshots
None
Issue Analytics
- State:
- Created a year ago
- Reactions:6
- Comments:16 (1 by maintainers)
 Top Results From Across the Web
Top Results From Across the Web
Unable to import Axios 1.x.x in ReactJS, Uncaught SyntaxError
I'm just trying to use axios in my React app. I can revert to 0.x.x, or I can try using fetch instead. But...
Read more >axios bad request | The AI Search Engine You Control
Edit: axios errors come in three types: message , request and response . To make sure you are handling all possible errors, you...
Read more >react-axios - npm
Supports custom axios instances through props or a <AxiosProvider ... > Create your own request components wrapped using the withAxios({options})( ...
Read more >axios | Yarn - Package Manager
message); } console.log(error.config); });. Using the validateStatus config option, you can override the default condition (status >= 200 && status < 300) and ......
Read more >Why You Need an API Layer and How To Build It in React
This is made possible by the Promise technology. Consequently, you need a Promise -based HTTP client like axios to implement an API layer....
Read more > Top Related Medium Post
Top Related Medium Post
No results found
 Top Related StackOverflow Question
Top Related StackOverflow Question
No results found
 Troubleshoot Live Code
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free Top Related Reddit Thread
Top Related Reddit Thread
No results found
 Top Related Hackernoon Post
Top Related Hackernoon Post
No results found
 Top Related Tweet
Top Related Tweet
No results found
 Top Related Dev.to Post
Top Related Dev.to Post
No results found
 Top Related Hashnode Post
Top Related Hashnode Post
No results found

Having to install an additional library not maintained by Node is not a workable solution.
Run:
npm i url. Error is due to: 4594