Skip to content

bob build not generated .aar file #170

@iqfar12

Description

@iqfar12

Hello,
i would like build my existing react native project to aar using bob builder,
i already follow the documentation for manual installation by adding react-native-builder-bob script:

react-native-builder-bob": {
  "source": "src",
  "output": "lib",
  "targets": [
    ["aar", {"reverseJetify": true}],
    ["commonjs", {"copyFlow": true}],
    "module",
    "typescript",
  ]
}
"scripts": {
  "prepare": "bob build"
}
"main": "lib/commonjs/index.js",
"module": "lib/module/index.js",
"react-native": "src/index.ts",
"types": "lib/typescript/index.d.ts",
"files": [
  "lib/",
  "src/"
]

and run

yarn bob build

and there's error

error: package com.facebook.react.bridge does not exist

and finally show up final error:

[Error: ENOENT: no such file or directory, copyfile 'android/build/outputs/aar/android.aar' -> '/Users/iqfar-infinitec/Desktop/qishe-mobile/lib/aar/android.aar'] {
  errno: -2,
  code: 'ENOENT',
  syscall: 'copyfile',
  path: 'android/build/outputs/aar/android.aar',
  dest: '/Users/iqfar-infinitec/Desktop/qishe-mobile/lib/aar/android.aar'
}
error Command failed with exit code 1.
info Visit https://yarnpkg.com/en/docs/cli/install for documentation about this command.

but in my android/app/build/output show up release and debug apk file instead of aar file

here is my package.json:

{
  "name": "WIKA",
  "version": "0.0.1",
  "private": true,
  "main": "lib/commonjs/index.js",
  "module": "lib/module/index.js",
  "react-native": "src/index.js",
  "types": "lib/typescript/index.d.ts",
  "files": [
    "lib/",
    "src/"
  ],
  "scripts": {
    "android": "react-native run-android",
    "ios": "react-native run-ios",
    "start": "react-native start",
    "test": "jest",
    "lint": "eslint .",
    "prepare": "bob build"
  },
  "dependencies": {
    "@react-native-community/art": "^1.2.0",
    "@react-native-community/async-storage": "^1.12.1",
    "@react-native-community/datetimepicker": "^3.0.9",
    "@react-native-community/geolocation": "^2.0.2",
    "@react-native-community/masked-view": "^0.1.10",
    "@react-navigation/bottom-tabs": "^5.11.7",
    "@react-navigation/native": "^5.9.2",
    "@react-navigation/stack": "^5.14.2",
    "axios": "^0.21.1",
    "d3": "^6.5.0",
    "moment": "^2.29.1",
    "react": "16.13.1",
    "react-native": "0.63.4",
    "react-native-background-actions": "^2.6.0",
    "react-native-builder-bob": "^0.18.1",
    "react-native-calendars": "^1.1255.0",
    "react-native-camera": "^3.42.0",
    "react-native-chart-kit": "^6.11.0",
    "react-native-fs": "^2.16.6",
    "react-native-gesture-handler": "^1.9.0",
    "react-native-image-crop-picker": "^0.35.3",
    "react-native-photo-editor": "^1.0.10",
    "react-native-reanimated": "^1.13.2",
    "react-native-safe-area-context": "^3.1.9",
    "react-native-screens": "^2.17.1",
    "react-native-svg": "^12.1.0",
    "react-native-svg-charts": "^5.4.0",
    "react-native-swiper": "^1.6.0",
    "react-native-swiper-flatlist": "^3.0.14",
    "react-native-vector-icons": "^8.0.0",
    "react-redux": "^7.2.2",
    "redux": "^4.0.5",
    "rn-fetch-blob": "^0.12.0"
  },
  "devDependencies": {
    "@babel/core": "^7.8.4",
    "@babel/runtime": "^7.8.4",
    "@react-native-community/eslint-config": "^1.1.0",
    "babel-jest": "^25.1.0",
    "eslint": "^6.5.1",
    "jest": "^25.1.0",
    "metro-react-native-babel-preset": "^0.59.0",
    "react-test-renderer": "16.13.1"
  },
  "jest": {
    "preset": "react-native",
    "modulePathIgnorePatterns": ["<rootDir>/lib/"]
  },
  "react-native-builder-bob": {
    "source": "src",
    "output": "lib",
    "targets": [
      ["aar", {"reverseJetify": true}],
      ["commonjs", {"copyFlow": true}],
      "module",
      "typescript"
    ]
  }
}

did i miss something on configuration?

thank you

Metadata

Metadata

Assignees

No one assigned

    Labels

    questionFurther information is requested

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions