Skip to content
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

'import.meta' is currently unsupported, js engine: hermes #16

Open
Helshr opened this issue Jan 17, 2024 · 3 comments
Open

'import.meta' is currently unsupported, js engine: hermes #16

Helshr opened this issue Jan 17, 2024 · 3 comments

Comments

@Helshr
Copy link

Helshr commented Jan 17, 2024

RN: 0.72.3

@Helshr
Copy link
Author

Helshr commented Jan 17, 2024

babel.config.js:

module.exports = {
presets: ['module:metro-react-native-babel-preset'],
plugins: [
'@babel/plugin-proposal-export-namespace-from',
'babel-plugin-transform-import-meta',
[
'module-resolver',
{
root: ['./src'],
extensions: ['.ios.js', '.android.js', '.js', '.ts', '.tsx', '.json'],
alias: {
buffer: '@craftzdog/react-native-buffer',
'@components': './src/components',
'@assets': './src/assets',
'@pages': './src/pages',
'@utils': './src/utils',
'@store': './src/store',
'@routes': './src/routes',
'@languages': './src/languages',
'@theme': './src/theme',
'@hook': './src/hook',
'@service': './src/service',
},
},
],
'react-native-reanimated/plugin',
],
};

@Helshr
Copy link
Author

Helshr commented Jan 17, 2024

package.json

{
"name": "PaiStoryApp",
"version": "0.0.1",
"private": true,
"scripts": {
"android": "react-native run-android",
"ios": "react-native run-ios",
"lint": "eslint .",
"start": "react-native start",
"test": "jest"
},
"dependencies": {
"@craftzdog/react-native-buffer": "^6.0.5",
"@alex-gale/react-native-image-capinsets": "0.5.6",
"@ant-design/react-native": "5.0.5",
"@invertase/react-native-apple-authentication": "2.3.0",
"@miblanchard/react-native-slider": "2.3.1",
"@react-native-async-storage/async-storage": "1.19.8",
"@react-native-camera-roll/camera-roll": "7.2.0",
"@react-native-community/blur": "4.3.2",
"@react-native-community/segmented-control": "2.2.2",
"@react-native-community/slider": "4.4.4",
"@react-native-picker/picker": "2.6.1",
"@react-navigation/bottom-tabs": "6.5.11",
"@react-navigation/native": "6.1.9",
"@react-navigation/native-stack": "6.9.17",
"@sentry/react-native": "5.14.1",
"@shopify/react-native-skia": "0.1.230",
"@tamagui/config": "1.79.10",
"@tanstack/react-query": "5.8.4",
"@wuba/react-native-echarts": "1.2.5",
"ahooks": "3.7.8",
"axios": "1.6.2",
"buffer": "6.0.3",
"camelize": "1.0.1",
"crypto-js": "4.2.0",
"echarts": "5.4.3",
"ffmpeg-kit-react-native": "6.0.2",
"formik": "2.4.5",
"i18next": "23.7.7",
"immer": "10.0.3",
"lodash": "4.17.21",
"lottie-ios": "4.3.3",
"lottie-react-native": "6.4.1",
"patch-package": "8.0.0",
"react": "18.2.0",
"react-i18next": "13.5.0",
"react-native": "0.72.7",
"react-native-audio-record": "0.2.2",
"react-native-audio-recorder-player": "3.6.5",
"react-native-device-info": "10.12.0",
"react-native-event-listeners": "1.0.7",
"react-native-fs": "2.20.0",
"react-native-gesture-handler": "2.14.0",
"react-native-linear-gradient": "2.8.3",
"react-native-localize": "3.0.3",
"react-native-orientation-locker": "1.6.0",
"react-native-permissions": "4.0.1",
"react-native-popover-view": "5.1.8",
"react-native-reanimated": "3.6.1",
"react-native-reanimated-carousel": "3.5.1",
"react-native-render-html": "6.3.4",
"react-native-safe-area-context": "4.7.4",
"react-native-screens": "3.27.0",
"react-native-sound": "0.11.2",
"react-native-svg": "14.1.0",
"react-native-swiper": "1.6.0",
"react-native-toast-message": "2.1.7",
"react-native-track-player": "4.0.1",
"react-native-tts": "4.1.0",
"react-native-update": "9.1.4",
"react-xml-parser": "^1.1.8",
"snakeize": "0.1.0",
"tamagui": "1.79.10",
"yup": "1.3.2",
"@xenova/transformers": "https://hub.fgit.cf/hans00/transformers.js.git#merge",
"onnxruntime-react-native": "1.16.1",
"zustand": "4.4.6"
},
"devDependencies": {
"@babel/core": "^7.21.8",
"@babel/preset-env": "^7.21.5",
"@babel/runtime": "^7.21.5",
"babel-jest": "^29.2.1",
"babel-plugin-module-resolver": "^5.0.0",
"babel-plugin-transform-define": "^2.1.1",
"babel-plugin-transform-import-meta": "^2.2.0",
"@babel/plugin-proposal-export-namespace-from": "^7.18.9",

"@react-native/eslint-config": "^0.72.2",
"@react-native/metro-config": "^0.72.11",
"@tsconfig/react-native": "^2.0.2",
"@types/lodash": "4.14.202",
"@types/react": "^18.0.24",
"@types/react-test-renderer": "^18.0.0",
"eslint": "^8.19.0",
"jest": "^29.2.1",
"metro-react-native-babel-preset": "0.73.9",
"prettier": "^2.4.1",
"react-test-renderer": "18.2.0",
"typescript": "4.8.4"

},
"resolutions": {
"onnxruntime-common": "1.16.1",
"onnxruntime-react-native": "1.16.1"
}
}

@hans00
Copy link
Owner

hans00 commented Jan 20, 2024

babel-plugin-transform-import-meta should fix this error.

Maybe try react-native start --reset-cache

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants