reactjs - 模块解析失败:意外的令牌?
问题描述
当我尝试运行我的 expo 项目时,它显示如下错误:
Module parse failed: Unexpected token (13:12)
You may need an appropriate loader to handle this file type, currently no loaders are configured to process this file. See https://webpack.js.org/concepts#loaders
| } from 'react-native'
| import { isIphoneX } from 'react-native-iphone-x-helper'
> import type { KeyboardAwareInterface } from './KeyboardAwareInterface'
|
| const _KAM_DEFAULT_TAB_BAR_HEIGHT: number = isIphoneX() ? 83 : 49
不知道这是从哪里来的,因为我所做的只是通过运行expo init
和安装一些依赖项来设置 expo 项目npm i
解决方案
推荐阅读
- linux - 为什么 Post Build 操作不会覆盖 Jenkins 中的构建状态?
- sql-server - SQL 简单舍入
- javascript - Nodemailer:没有定义收件人,如何解决?
- spring - Spring Boot Html to Image(Html 渲染)
- android - 在 Android 上模糊图像中的区域(在 Java 中)
- c# - 使用 AWS 开发工具包从 Amazon S3 下载对象 - 结果文件已损坏
- virtual-machine - 如何将文件从本地 win 10 操作系统移动到 VMware ESXi 上的虚拟机?
- java - 按钮悬停和按下效果 CSS Javafx
- java - 在android中根据设备区域禁用逗号或点
- javascript - 离线模式处于活动状态时 react-native-firebase 是否安全?