Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Error: Missing app.json. See https://docs.expo.io/ #2195

Closed
qq471754603 opened this issue Feb 18, 2019 · 2 comments
Closed

Error: Missing app.json. See https://docs.expo.io/ #2195

qq471754603 opened this issue Feb 18, 2019 · 2 comments
Assignees

Comments

@qq471754603
Copy link

问题描述
[问题描述:expo build:android Error: Missing app.json. See https://docs.expo.io/]

复现步骤
[复现问题的步骤]
1.在config prod.js文件下添加

// 这里可以贴代码
module.exports = {
  env: {
    NODE_ENV: '"production"'
  },
  defineConstants: {
  },
  weapp: {},
  h5: {},
  rn: {
    appJson: {
      "expo": {
        "name": "myApp",
        "description": "A very interesting project.",
        "slug": "myApp",
        "privacy": "public",
        "sdkVersion": "27.0.0",
        "platforms": ["ios", "android"],
        "version": "1.0.0",
        "orientation": "portrait",
        "updates": {
          "fallbackToCacheTimeout": 0
        },
        "assetBundlePatterns": [
          "**/*"
        ],
        "ios": {
          "bundleIdentifier": "com.fds.myApp"
        },
        "android": {
          "package": "com.fds.myApp"
        }
      }
    }
  }
}taro git:(master)  taro build --type rn
👽 Taro v1.2.13

开始编译项目 taro
编译  JS        /Users/huxiansheng/Desktop/taro/src/app.js
编译  SCSS      /Users/huxiansheng/Desktop/taro/src/app.scss
生成  生成文件  /Users/huxiansheng/Desktop/taro/.rn_temp/app_styles.js
拷贝  HTML      /Users/huxiansheng/Desktop/taro/src/index.html
编译  JS        /Users/huxiansheng/Desktop/taro/src/components/welcome/index.js
编译  JS        /Users/huxiansheng/Desktop/taro/src/pages/index/index.js
编译  SCSS      /Users/huxiansheng/Desktop/taro/src/pages/index/index.scss
生成  生成文件  /Users/huxiansheng/Desktop/taro/.rn_temp/pages/index/index_styles.js
生成  app.json  /Users/huxiansheng/Desktop/taro/.rn_temp/app.json
生成  package.json  /Users/huxiansheng/Desktop/taro/.rn_temp/package.json
拷贝  crna-entry.js  /Users/huxiansheng/Desktop/taro/.rn_temp/bin/crna-entry.js
编译  编译完成,花费479 ms  

Run expo build:android  or expo build:ios  in .rn_temp/ to building standalone apps
you can visite https://docs.expo.io/versions/latest/distribution/building-standalone-apps for more infotaro git:(master)  expo build:android  
[10:55:14] Error: Missing app.json. See https://docs.expo.io/
[10:55:14] There is an error with your project. See above logs for information.
[10:55:14] Set EXPO_DEBUG=true in your env to view the stack trace.
 Making sure project is set up correctly...%                                                              
  taro git:(master)  taro build --type rn
👽 Taro v1.2.13

开始编译项目 taro
编译  JS        /Users/huxiansheng/Desktop/taro/src/app.js
编译  SCSS      /Users/huxiansheng/Desktop/taro/src/app.scss
生成  生成文件  /Users/huxiansheng/Desktop/taro/.rn_temp/app_styles.js
拷贝  HTML      /Users/huxiansheng/Desktop/taro/src/index.html
编译  JS        /Users/huxiansheng/Desktop/taro/src/components/welcome/index.js
编译  JS        /Users/huxiansheng/Desktop/taro/src/pages/index/index.js
编译  SCSS      /Users/huxiansheng/Desktop/taro/src/pages/index/index.scss
生成  生成文件  /Users/huxiansheng/Desktop/taro/.rn_temp/pages/index/index_styles.js
生成  app.json  /Users/huxiansheng/Desktop/taro/.rn_temp/app.json
生成  package.json  /Users/huxiansheng/Desktop/taro/.rn_temp/package.json
拷贝  crna-entry.js  /Users/huxiansheng/Desktop/taro/.rn_temp/bin/crna-entry.js
编译  编译完成,花费477 ms  

Run expo build:android  or expo build:ios  in .rn_temp/ to building standalone apps
you can visite https://docs.expo.io/versions/latest/distribution/building-standalone-apps for more infotaro git:(master)  expo build:android  
[11:00:34] Error: Missing app.json. See https://docs.expo.io/
[11:00:34] There is an error with your project. See above logs for information.
[11:00:34] Set EXPO_DEBUG=true in your env to view the stack trace.
 Making sure project is set up correctly...%                                                              
  taro git:(master)  

期望行为
[生成android包]
报错信息

[Error: Missing app.json. See https://docs.expo.io/
[11:00:34] There is an error with your project. See above logs for information.]

系统信息

Taro v1.2 及以上版本已添加 taro info 命令,方便大家查看系统及依赖信息,运行该命令后将结果贴下面即可。
➜ taro git:(master) ✗ taro info
👽 Taro v1.2.13

Taro CLI 1.2.13 environment info:
System:
OS: macOS 10.14.3
Shell: 5.3 - /bin/zsh
Binaries:
Node: 10.15.1 - /usr/local/bin/node
Yarn: 1.13.0 - /usr/local/bin/yarn
npm: 6.4.1 - /usr/local/bin/npm
npmPackages:
@tarojs/components: 1.2.12 => 1.2.12
@tarojs/plugin-babel: 1.2.12 => 1.2.12
@tarojs/plugin-csso: 1.2.12 => 1.2.12
@tarojs/plugin-sass: 1.2.12 => 1.2.12
@tarojs/plugin-uglifyjs: 1.2.12 => 1.2.12
@tarojs/rn-runner: ^1.2.12 => 1.2.13
@tarojs/router: 1.2.12 => 1.2.12
@tarojs/taro: 1.2.12 => 1.2.12
@tarojs/taro-alipay: 1.2.12 => 1.2.12
@tarojs/taro-h5: 1.2.12 => 1.2.12
@tarojs/taro-swan: 1.2.12 => 1.2.12
@tarojs/taro-tt: 1.2.12 => 1.2.12
@tarojs/taro-weapp: 1.2.12 => 1.2.12
@tarojs/webpack-runner: 1.2.12 => 1.2.12
eslint-config-taro: 1.2.12 => 1.2.12
eslint-plugin-taro: 1.2.12 => 1.2.12
nervjs: ^1.3.9 => 1.3.12

补充信息
[可选]
[app.json配置]

@taro-bot
Copy link

taro-bot bot commented Feb 18, 2019

欢迎提交 Issue~

如果你提交的是 bug 报告,请务必遵循 Issue 模板的规范,尽量用简洁的语言描述你的问题,最好能提供一个稳定简单的复现。🙏🙏🙏

如果你的信息提供过于模糊或不足,或者已经其他 issue 已经存在相关内容,你的 issue 有可能会被关闭。

Good luck and happy coding~

@taro-bot
Copy link

taro-bot bot commented Apr 1, 2019

CC @Pines-Cheng

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants