You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
changed the title [-]1.0.0: Restricted in strict mode, js engine: hermes[/-][+]Restricted in strict mode, js engine: hermes (React Native + Axios 1.0.0)[/+]on Oct 4, 2022
i have the same issue in my new react native project please let me know if there is any solution for the same
Reacted by Carson Chen, RODRIGO SARMENTO XAVIER, Abu Raihan, Arturo Torres, Rob, Daniel Morales González, Ozuna, Kevin Lee, Muhammad Khalilullah Uthman, sp-studios and 1 more
Same issue, 3 different RN projects with 1.0.0. All projects use axios interceptors in some form. Downgraded to 0.27.2, working fine again.
Reacted by Pedro Arrazola Leon, David Ramirez, Rayhand Fernanda Viantama, Stijn van der Hoeven, Sébastien Chandonay, Romick2005, Ciro, Nima Zarei, nigarulucutsoy, KarineGithub and 11 more
Reacted by Rayhand Fernanda Viantama, RiTech, Rob, SIMBA PERCY C MUPFUNYA, Mohammed Abdelhady, Guilherme Athayde, Giosevid, Yo and Cenkay Aydın
Had this issue with axios 1.1.2 in react native and was able to resolve it by replacing
import axios from 'axios' with const axios = require('axios').default;
I just tried it, it didn't work for me, the same error message keeps popping up "TypeError: Restricted in strict mode, js engine: hermes" besides a new one "[TypeError: Cannot read property 'default' of undefined]"
On Sat, 8 Oct, 2022, 11:35 pm ANDRES MADERA, ***@***.***> wrote:
Had this issue with axios 1.1.2 in react native and was able to resolve it
by replacing
import axios from 'axios' with const axios = require('axios').default;
I just tried it, it didn't work for me, the same error message keeps
popping up "TypeError: Restricted in strict mode, js engine: hermes"
besides a new one "[TypeError: Cannot read property 'default' of undefined]"
"axios": "^1.1.2",
"react": "18.1.0",
"react-native": "0.70.2",
—
Reply to this email directly, view it on GitHub
<#4998 (comment)>, or
unsubscribe
<https://github.com/notifications/unsubscribe-auth/A3N4L33SDVYGELOFFS36TETWCGZXFANCNFSM6AAAAAAQ47XETY>
.
You are receiving this because you commented.Message ID:
***@***.***>
i have posted the solution for same please check it out …
On Sat, 8 Oct, 2022, 11:35 pm ANDRES MADERA, @.> wrote: Had this issue with axios 1.1.2 in react native and was able to resolve it by replacing import axios from 'axios' with const axios = require('axios').default; I just tried it, it didn't work for me, the same error message keeps popping up "TypeError: Restricted in strict mode, js engine: hermes" besides a new one "[TypeError: Cannot read property 'default' of undefined]" "axios": "^1.1.2", "react": "18.1.0", "react-native": "0.70.2", — Reply to this email directly, view it on GitHub <#4998 (comment)>, or unsubscribe https://github.com/notifications/unsubscribe-auth/A3N4L33SDVYGELOFFS36TETWCGZXFANCNFSM6AAAAAAQ47XETY . You are receiving this because you commented.Message ID: @.>
Yes downgrading axios to 0.26.0 works, I hope that in a future version of axios we will not have this problem
@ManishBitsInfotech Dowgrading is not a fix. It does not make 1.x.x work any better.
Reacted by Dr. Sergey Pogodin, antFrancon, Antalóczi Arnold, ManishBitsInfotech, ANDRES MADERA, Rajendran Nadar, Rodrigo Pereira, Infernum Black, RODRIGO SARMENTO XAVIER, Jinho Jeong and 14 more
We are all waiting for the next release as it seems to be fixed in #5224. Only sure way for now unit then is to downgrade to 0.27.2, I saw somebody mention a patch but best to keep an eye on the releases
Please provide feedback in either the pinned issue or discussion thread 🧵
Reacted by 0xbenon, Nazar Sydiaha, luka.patrun, José Medina, Kevin Jayden Wivano, Nelson Gonçalves, Mehmet Furkan Sakız, João Felipe, Moseqi and chahat-we
Activity
[-]1.0.0: Restricted in strict mode, js engine: hermes[/-][+]Restricted in strict mode, js engine: hermes (React Native + Axios 1.0.0)[/+]ManishBitsInfotech commentedon Oct 5, 2022
i have the same issue in my new react native project please let me know if there is any solution for the same
hikmert commentedon Oct 5, 2022
It's same here with a new React-native project. It doesn't allow any JS files although I set allowJs to true in tsconfig.json
ManishBitsInfotech commentedon Oct 5, 2022
What is the solution for this
uasad1099 commentedon Oct 5, 2022
lower axios version worked for me - axios:'0.26.0'
grandevel commentedon Oct 5, 2022
Same issue, 3 different RN projects with 1.0.0. All projects use axios interceptors in some form. Downgraded to 0.27.2, working fine again.
ManishBitsInfotech commentedon Oct 6, 2022
I have downgrade the axios version for this issue
https://www.npmjs.com/package/axios/v/0.26.0
and also add this line in my api call for use formData
axios.post(url, formData, {
headers: { 'Content-Type': 'multipart/form-data' },
transformRequest: formData => formData, // this line
})
i hope this will work for you too guys
hikmert commentedon Oct 6, 2022
Downgrading Axios resolved the issue for me.
jrobinsonadrenaline commentedon Oct 6, 2022
Same issue here, as well as the same solution - downgrade to v0.26.0
am2619015 commentedon Oct 7, 2022
Same issue here on axios 1.1.0, let's hope there's another solution to the downgrade
am2619015 commentedon Oct 8, 2022
I just tried it, it didn't work for me, the same error message keeps popping up "TypeError: Restricted in strict mode, js engine: hermes" besides a new one "[TypeError: Cannot read property 'default' of undefined]"
"axios": "^1.1.2",
"react": "18.1.0",
"react-native": "0.70.2",
ManishBitsInfotech commentedon Oct 8, 2022
am2619015 commentedon Oct 8, 2022
Yes downgrading axios to 0.26.0 works, I hope that in a future version of axios we will not have this problem
iamciro commentedon Oct 8, 2022
Same issue here, as mentioned by grandevel, downgrading to 0.27.2 solved it.
tapz commentedon Oct 9, 2022
@ManishBitsInfotech Dowgrading is not a fix. It does not make 1.x.x work any better.
24 remaining items
natemartins commentedon Nov 4, 2022
While downgrading axios solves the issue, it is not recommended. What I did was to patch axios using @osielmesa PR.
How to patch:
patch-packageif you have not already done so.npx patch-package axios. Note that if you have not done Step 2, you will be prompted to installpatch-packageHopefully, this resolves the issue for us while we await axios to fix it from their end or approve and merge the PR
moustaouiSalaheddine commentedon Nov 8, 2022
Downgrading to Axios 0.27.2 resolved the issue for me.
"axios": "0.27.2"
Uzef1997 commentedon Nov 9, 2022
Still getting the same issue in 1.1.3 version of axios any leads on that except downgrading the version
Simba-Mupfunya commentedon Nov 9, 2022
We are all waiting for the next release as it seems to be fixed in #5224. Only sure way for now unit then is to downgrade to 0.27.2, I saw somebody mention a patch but best to keep an eye on the releases
thiago-albuquerque commentedon Nov 9, 2022
npm uninstall axios => npm install [email protected] => uninstall your app and then re-install.
jasonsaayman commentedon Nov 10, 2022
Hi 👋
Please try the latest pre-release by running the following:
Please provide feedback in either the pinned issue or discussion thread 🧵
0xbenon commentedon Nov 10, 2022
Hi bro, i just installed this version, it works !
krendus commentedon Nov 13, 2022
this worked for me too thanks
nelsonVE commentedon Nov 14, 2022
Works like a charm, thank you
jrobinsonadrenaline commentedon Nov 14, 2022
Works perfect for me! Thanks!
UIT-54: Add API hook to connect to Publiq API
bombillazo commentedon Nov 15, 2022
Seems this is still causing issues with React Native : react/react-native#34688
UPDATE
This fixed it for me.
DigitalBrainJS commentedon Nov 15, 2022
@bombillazo There doesn't seem to be anything related to Axios v1.2.0-alpha.1
UIT-54: Add API hook to connect to Publiq API