You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
To save anyone else the headache of figuring this out, Axios changed something with how they export the main module and its not compatible with the non-ejected CRA, and as CRA is deprecated at this point it likely never will be.
Problem is the var axios = require('axios') returns a string like /static/media/axios.5036f7f7333f291ef6b3.cjs not the actual package, so you get this error when trying to import axios-debug-log: Uncaught TypeError: Cannot read properties of undefined (reading 'request') at addLogger
To save anyone else the headache of figuring this out, Axios changed something with how they export the main module and its not compatible with the non-ejected CRA, and as CRA is deprecated at this point it likely never will be.
facebook/create-react-app#12605
facebook/create-react-app#12021
Problem is the
var axios = require('axios')
returns a string like/static/media/axios.5036f7f7333f291ef6b3.cjs
not the actual package, so you get this error when trying to import axios-debug-log:Uncaught TypeError: Cannot read properties of undefined (reading 'request') at addLogger
Apparently you can run CRACO to get around this
I was able to get it running by copying over index.js and switching to an import statement
The text was updated successfully, but these errors were encountered: