Axios upgrade from 0.21.4 to 1.11.0 giving Uncaught TypeError: Cannot read properties of undefined (reading 'call') during runtime #6991
ShivangKumarSingh
started this conversation in
General
Replies: 0 comments
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
-
Hi Everyone,
Due to high vulnerability we are trying to update axios from 0.21.4 to 1.11.0 which doesn't have the vulnerability issue. But after upgrading it is breaking at runtime after the image has build and deployed with error
"Uncaught TypeError: Cannot read properties of undefined (reading 'call') in webpack_require"
webpack: 5.52.1
We are importing axios like this : import axios from "axios";
and only using this functionality : await axios.get(url).then((res: any) => {
appUrl += res?.data.Versions[res?.data.Versions.length - 1].URL;
window.open(appUrl, "_blank");
Before axios upgrade there is no issue and no error.
We have also tried adding alias for axios resulting in setTimeout issue, please help to resolve the issue. For testcases fix we have axios.cjs in module mapper but if not is impacting anything as verified after removing it as well.
Beta Was this translation helpful? Give feedback.
All reactions