首页 > 解决方案 > 模块解析失败:意外的令牌?

问题描述

当我尝试运行我的 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

标签: reactjsreact-nativeexpo

解决方案


推荐阅读