[英]Unable to resolve “../../App” from “node_modules\expo\AppEntry.js” Failed building JavaScript bundle
I cant open my vue file with expo. 我无法用expo打开我的vue文件。 It gives AppEntry.js error. 它给出了AppEntry.js错误。 The problem is in AppEntry.js file my vue file hasnt seen so it gives error. 问题是在AppEntry.js文件中我的vue文件没有看到所以它给出了错误。 I couldnt find how to add .vue extension. 我无法找到如何添加.vue扩展名。 I need help guys this error drives me mad. 我需要帮助这个错误让我发疯。
I updated my expo-cli and vue-native-cli and I use node 10.6.1 version. 我更新了我的expo-cli和vue-native-cli,我使用了节点10.6.1版本。
import { registerRootComponent } from 'expo';
import { activateKeepAwake } from 'expo-keep-awake';
import App from "../../App" // The problem part is here. AppEntry doesnt accept .vue file I cant even see it.
if (__DEV__
)
{
activateKeepAwake();
}
registerRootComponent(App);
Also in same place 也在同一个地方
"sideEffects":
[
"*.fx.js",
"*.fx.web.js"
],
I tried to add .vue here and it didnt work for me. 我试着在这里添加.vue,它对我没用。 If you ask me to solve this we must add a code which provides AppEntry.js to read .vue extensions. 如果你让我解决这个问题,我们必须添加一个代码,提供AppEntry.js来读取.vue扩展名。
I expect see the App.vue page but I take AppEntry.js error. 我希望看到App.vue页面但我收到AppEntry.js错误。
I had similar issue, and I fixed it by installing 'expo-keep-awake' and 'react-native-unimodules' by using 'npm install react-native-unimodules' and 'npm install expo-keep-awake'. 我有类似的问题,我通过使用'npm install react-native-unimodules'和'npm install expo-keep-awake'安装'expo-keep-awake'和'react-native-unimodules'来修复它。
According to this page , you should ensure that react-native-unimodules is installed when using the expo-keep-awake. 根据此页面 ,您应确保在使用expo-keep-awake时安装react-native-unimodules。
Hope this is helpful to you :) 希望这对你有帮助:)
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.