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

TypeError: axios.get is not a function #598

Closed
amithgeorge opened this issue Oct 6, 2022 · 2 comments
Closed

TypeError: axios.get is not a function #598

amithgeorge opened this issue Oct 6, 2022 · 2 comments

Comments

@amithgeorge
Copy link

Installed v6. Even with a simple .gitignore-sync file, I get this error

TypeError: axios.get is not a function
    at Object.getContentFile (<path-to-project>/node_modules/ignore-sync/src/utils/github.js:11:38)
    at <path-to-project>/node_modules/ignore-sync/src/generateIgnoreFile.js:25:21
    at Array.map (<anonymous>)
    at githubSourceFetcher (<path-to-project>/node_modules/ignore-sync/src/generateIgnoreFile.js:24:16)
    at <path-to-project>/node_modules/ramda/src/cond.js:64:30
    at <path-to-project>/node_modules/ramda/src/internal/_arity.js:11:19
    at _map (<path-to-project>/node_modules/ramda/src/internal/_map.js:7:19)
    at map (<path-to-project>/node_modules/ramda/src/map.js:83:14)
    at <path-to-project>/node_modules/ramda/src/internal/_dispatchable.js:50:15
    at Object.f2 [as map] (<path-to-project>/node_modules/ramda/src/internal/_curry2.js:34:14)

File

[local]
client/dist

[github/gitignore]
Node.gitignore
Global/macOS.gitignore
@amithgeorge
Copy link
Author

Seems the fix might be to require axios correctly - https://github.com/axios/axios#note-commonjs-usage

const axios = require('axios').default;

in

const axios = require('axios')

@foray1010
Copy link
Owner

They just released v1.1.0 with this breaking change an hour ago... That's why everything works fine for me but not you. I have just released v6.0.1 to fix that.

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