编译失败-Expo Web-安装UI-Kitten后

时间:2019-12-10 19:50:41

标签: javascript react-native expo aws-amplify react-native-ui-kitten

在安装UI-Kitten并将其应用于我的App.js之后,我开始出现此错误消息:


Failed to compile
/home/ubuntu/environment/node_modules/@ui-kitten/components/ui/card/card.component.js 104:20
Module parse failed: Unexpected token (104:20)
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
|         };
|         this.renderDivider = () => {
>             return (<Divider />);
|         };
|         this.renderHeader = (headerStyles) => {

我已经查看了card.component.js,这似乎很好。此外,它似乎无法与javascript以外的其他文件一起使用,我认为应该在expo web中正确加载。

有什么暗示吗?

谢谢大家!

2 个答案:

答案 0 :(得分:1)

这是我们的错,我们将尽快对其进行修补。该问题存在于github

答案 1 :(得分:0)

这里也一样:

/mnt/f/WORK/React/bridge2/react-tv-client/node_modules/@ui-kitten/components/ui/input/input.component.js 105:38
Module parse failed: Unexpected token (105:38)
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
|         this.webEventResponder = devsupport_1.WebEventResponder.create(this);
|         this.focus = () => {
>             this.textInputRef.current?.focus();
|         };
|         this.blur = () => {