小编Aaz*_*ari的帖子

导出命名空间应首先通过 `@babel/plugin-proposal-export-namespace-from` 进行转换

当我想要构建我的 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)

react-native react-navigation

32
推荐指数
3
解决办法
3万
查看次数

标签 统计

react-native ×1

react-navigation ×1