-
Notifications
You must be signed in to change notification settings - Fork 276
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
Please update axios #1343
Comments
Hi @thany ! And last, but not least, there are some workarounds you could use. While not an official fix, I hope they can help.
|
I have also tried to override the depedency in package.json, from memory I went like this: "overrides": {
"axios": "$axios"
} It worked fine. But strangely this also proves that updating axios can be done without errors, or compiling it with this override in place would undoubtedly reproduce your error. Perhaps because CRA is not a part of a Next.js app, iirc. |
Can you please look into this because of: An issue discovered in Axios 0.8.1 through 1.5.1 inadvertently reveals the confidential XSRF-TOKEN stored in cookies by including it in the HTTP header X-XSRF-TOKEN for every request made to any host allowing attackers to view sensitive information. |
Newer versions of axios would also address the following Security findings:
|
+1 to upgrade axios |
1 similar comment
+1 to upgrade axios |
Description
The types returned from
AxiosDataFetcher::fetch()
from@sitecore-jss/sitecore-jss-nextjs
is incompatible with the actual type declared inaxios
. This happens after updating Axios to the latest version.Please note that the code runs fine, but won't perform a production build because of a typing error.
JSS returns this type:
Whereas an up-to-date Axios package expects a different, incompatible one:
It bares noting that putting overrides in package.json might work, but doesn't in our case, for some reason. A little bit like this:
Should work, but doesn't.
Expected behavior
No error, and an up-to-date Axios subdependency in sitecore-jss-nextjs.
Steps To Reproduce
data-fetcher.ts
Possible Fix
Please update Axios in
@sitecore-jss/sitecore-jss-nextjs
at your earliest convenience.Your Environment
Screenshots
The text was updated successfully, but these errors were encountered: