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

[email protected] not compatible with unejected CRAv5 #78

Open
samselfridge-cnc opened this issue Oct 4, 2023 · 1 comment
Open

[email protected] not compatible with unejected CRAv5 #78

samselfridge-cnc opened this issue Oct 4, 2023 · 1 comment

Comments

@samselfridge-cnc
Copy link

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

@Gerhut Gerhut pinned this issue Oct 7, 2023
@Gerhut
Copy link
Owner

Gerhut commented Oct 7, 2023

Let me reopen this and restructure this package to a modern package with multiple types of export (cjs, esm etc).

@Gerhut Gerhut reopened this Oct 7, 2023
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