世博会在当地建设,不会发布

时间:2017-10-30 13:39:33

标签: expo

我已启动并运行了我的未启用的expo应用程序,并且我已成功在android和iOS上本地构建并成功运行它而没有错误。但是,当我尝试发布应用程序时,我无法解决模块错误。

这是完整的错误:

[exp] Failed building JavaScript bundle.
[exp] Unable to resolve module `BikeShare/theme/components` from `/Users/gdaunton/Projects/BikeShare/App.js`: Module does not exist in the module map
[exp]
[exp] This might be related to https://github.com/facebook/react-native/issues/4968
[exp] To resolve try the following:
[exp]   1. Clear watchman watches: `watchman watch-del-all`.
[exp]   2. Delete the `node_modules` folder: `rm -rf node_modules && npm install`.
[exp]   3. Reset packager cache: `rm -fr $TMPDIR/react-*` or `npm start -- --reset-cache`.
[exp] Packager URL http://localhost:19001/node_modules/expo/AppEntry.bundle?dev=false&minify=true&hot=false&assetPlugin=/Users/gdaunton/Projects/BikeShare/node_modules/expo/tools/hashAssetFiles&platform=ios returned unexpected code 500. Please open your project in the Expo app and see if there are any errors. Also scroll up and make sure there were no errors or warnings when opening your project.

基本上我有这样的设置:

BikeShare
 - static
   - js
     - theme
       - components
         - index.js
  - App.js

和.babelrc:

["module-alias", [
  { "src": "./static/js", "expose": "BikeShare" }
]]

1 个答案:

答案 0 :(得分:1)

我发现这是因为我的别名是从我的主别名(即BikeShare/img)分支出来的。我必须将所有这些单独切换为命名空间(仅img/)。我也转而使用module-resolver代替module-alias,因为这是在一些地方推荐的。

相关问题