Module not found: Error: Can't resolve './lib/axios'

Webpack can not find an entry point for axios, because try to search typescript file, but there is no such file. You should add .js to the resolve extensions. More information here: https://webpack.js.org/configuration/resolve/#resolve-extensions

resolve: {
    extensions: ['.ts', '.js']
  },


For me the problem was that I didn't restart the yarn start service after installing axios the library was correctly installed in the app local node_modules directory.

Solution

Stopped the yarn service with CTRL+C and restarted it again with yarn start.


I had the same problem and the following command solved my problem.

npm install --save axios