简体   繁体   English

无法解决“node_modules \\ expo \\ AppEntry.js”中的“../../App”构建JavaScript包失败

[英]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版本。

node_modules/expo/AppEntry.js node_modules /博览会/ AppEntry.js

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 也在同一个地方

node_modules/expo/package.json node_modules /博览会/的package.json

 "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.

相关问题 错误:无法从``解析模块`./node_modules\\expo\\AppEntry` - Error: Unable to resolve module `./node_modules\expo\AppEntry` from `` 我该如何解决这个问题:“node_modules/expo/AppEntry.js: [BABEL]”? - How do I fix this issue: "node_modules/expo/AppEntry.js: [BABEL]"? 无法从 expo/react-native 应用程序中的“node_modules\@firebase\app\dist\esm\index.esm2017.js”解析“idb” - Unable to resolve "idb" from "node_modules\@firebase\app\dist\esm\index.esm2017.js" in expo/react-native app React Native:“构建 JavaScript 包失败。 无法从“App.js”解析“@react-navigation/stack” - React native: “Failed building JavaScript bundle. Unable to resolve ”@react-navigation/stack“ from ”App.js“” 未能构建 JavaScript 捆绑包。 无法解析模块。/reanimated2 - Failed building JavaScript bundle. Unable to resolve module ./reanimated2 无法从“node_modules/react-native/Libraries/ART/ARTSerializablePath.js”解析“art/core/class.js” - Unable to resolve "art/core/class.js" from "node_modules/react-native/Libraries/ART/ARTSerializablePath.js" 无法从“node_modules\react-navigation-stack\lib\module\navigators\createStackNavigator.js”解析“react-navigation” - Unable to resolve “react-navigation” from “node_modules\react-navigation-stack\lib\module\navigators\createStackNavigator.js” 无法从 `node_modules\react-redux\lib\connect\mapDispatchToProps.js` 解析模块 `../../../../src/redux` - Unable to resolve module `../../../../src/redux` from `node_modules\react-redux\lib\connect\mapDispatchToProps.js` rollup 是否将 node_modules 捆绑到 bundle.js 中? - Does rollup bundle node_modules into bundle.js? 无法在 Express js 中安装 node_modules - Unable to install node_modules in Express js
 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM