Restricted in strict mode, js engine: hermes
See original GitHub issueDescription
After updating to RN 0.70.2 I started getting this error:
Error: Requiring module "src/api/Api.js", which threw an exception: TypeError: Restricted in strict mode, js engine: hermes
Version
0.70.2
Output of npx react-native info
System: OS: macOS 12.6 CPU: (8) x64 Intel® Core™ i7-1068NG7 CPU @ 2.30GHz Memory: 73.93 MB / 32.00 GB Shell: 5.8.1 - /bin/zsh Binaries: Node: 16.17.0 - /usr/local/opt/node@16/bin/node Yarn: 1.22.19 - /usr/local/bin/yarn npm: 8.15.0 - /usr/local/opt/node@16/bin/npm Watchman: 2022.10.03.00 - /usr/local/bin/watchman Managers: CocoaPods: 1.11.3 - /usr/local/bin/pod SDKs: iOS SDK: Platforms: DriverKit 21.4, iOS 16.0, macOS 12.3, tvOS 16.0, watchOS 9.0 Android SDK: API Levels: 25, 26, 27, 28, 29, 30, 31, 33 Build Tools: 30.0.3, 31.0.0, 33.0.0 Android NDK: Not Found IDEs: Android Studio: 2021.2 AI-212.5712.43.2112.8815526 Xcode: 14.0.1/14A400 - /usr/bin/xcodebuild Languages: Java: 14.0.2 - /usr/bin/javac npmPackages: @react-native-community/cli: Not Found react: 18.2.0 => 18.2.0 react-native: 0.70.2 => 0.70.2 react-native-macos: Not Found npmGlobalPackages: react-native: Not Found
Steps to reproduce
Import a function.
Snack, code example, screenshot, or link to a repository
import { logout } from './api/Api';
Issue Analytics
- State:
- Created a year ago
- Reactions:1
- Comments:8
Top GitHub Comments
downgrade axios to axios ^0.27.2 and npm start – --reset-cache
@hikmert This is because of Axios 1.0.0.
https://github.com/axios/axios/issues/4998#issuecomment-1268162199