当我想要构建我的 APK 时,出现以下错误。
导出命名空间应首先转换为
@babel/plugin-proposal-export-namespace-from
我需要说我已经导入react-native-gesture-handler了index.js
这是我的index.js
import 'react-native-gesture-handler';
import {AppRegistry} from 'react-native';
import App from './app/App';
import {name as appName} from './app.json';
import { LogBox } from 'react-native';
LogBox.ignoreAllLogs();
AppRegistry.registerComponent(appName, () => App);
Run Code Online (Sandbox Code Playgroud)
在开发模式下,我没有收到该错误。
这是我的 package.json
{
"name": "blackout",
"version": "0.0.1",
"private": true,
"scripts": {
"android": "react-native run-android",
"ios": "react-native run-ios",
"start": "react-native start",
"test": "jest",
"lint": "eslint ."
},
"dependencies": {
"@react-native-async-storage/async-storage": "^1.17.6",
"@react-native-community/geolocation": "^2.1.0",
"@react-native-community/netinfo": "^9.0.0",
"@react-native-community/viewpager": "^5.0.11",
"@react-navigation/bottom-tabs": "^6.3.1",
"@react-navigation/native": "^6.0.10",
"@react-navigation/native-stack": "^6.6.2", …Run Code Online (Sandbox Code Playgroud)