ButterCMS / buttercms-js

Node/JS API client for ButterCMS (https://buttercms.com)
Other
162 stars 32 forks source link

Bug - axios.create is not a function #55

Closed spencerkordecki closed 1 year ago

spencerkordecki commented 1 year ago

Getting an error in v1.2.10 of the package with axios

TypeError: axios.create is not a function (get, butter.js:53)

The project that I'm using this library in does not have a separate install of axios so when I'm trying to use 1.2.10 of buttercms-js, I get the error that axios.create is not a function.

The workaround is downgrading the library to v1.2.9. Below are the snippets from each version from package-lock.json for additional info.

    "buttercms": {
      "version": "1.2.9",
      "requires": {
        "axios": "~0.21.1"
      }
    },

    "buttercms": {
      "version": "1.2.10",
      "requires": {
        "axios": "^1.2.5"
      }
    },
mettad3v commented 1 year ago

Can confirm, this bug had me on the ropes for quite a while. Came on here to create this caveat and save other devs some time, thanks!