Expo 在本地构建,不会发布
Expo builds locally, won’t publish
我已经启动了未弹出的 expo 应用程序并 运行ning 我已经成功构建 运行 它在 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" }
]]
我发现这是因为我有从我的主要别名(即 BikeShare/img
)分支出来的别名。我不得不将所有这些切换为单独命名空间(仅 img/
)。我也改用 module-resolver
而不是 module-alias
,因为有几个地方推荐这样做。
我已经启动了未弹出的 expo 应用程序并 运行ning 我已经成功构建 运行 它在 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" }
]]
我发现这是因为我有从我的主要别名(即 BikeShare/img
)分支出来的别名。我不得不将所有这些切换为单独命名空间(仅 img/
)。我也改用 module-resolver
而不是 module-alias
,因为有几个地方推荐这样做。