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

🔧 Build Error with react-native-vision-camera Example App on Windows using VS Code #2778

Closed
4 of 5 tasks
allorazz opened this issue Apr 22, 2024 · 4 comments
Closed
4 of 5 tasks
Labels
🔧 build error Issue is related to building VisionCamera in your project

Comments

@allorazz
Copy link

How were you trying to build the app?

I was trying to build and run the example app for react-native-vision-camera on my Windows machine using Visual Studio Code. I intended to use Expo for development. I followed the instructions from the repository to set up the playground by running the following commands:

git clone https://github.com/mrousavy/react-native-vision-camera
cd react-native-vision-camera/package
yarn bootstrap

However, the build fails with a generic "Command failed with exit code 1," and I am unable to find relevant information regarding this error.

Full build logs

PS C:\Users\carol\Desktop\VISION> git clone https://github.com/mrousavy/react-native-vision-camera
>> cd react-native-vision-camera/package
>> yarn bootstrap
Cloning into 'react-native-vision-camera'...
remote: Enumerating objects: 23835, done.
remote: Counting objects: 100% (7085/7085), done.
remote: Compressing objects: 100% (2578/2578), done.
remote: Total 23835 (delta 4364), reused 5966 (delta 3511), pack-reused 16750
Receiving objects: 100% (23835/23835), 102.22 MiB | 18.26 MiB/s, done.
Resolving deltas: 100% (15102/15102), done.
yarn run v1.22.22
$ yarn && cd example && yarn && yarn pods
[1/4] Resolving packages...
[2/4] Fetching packages...
[3/4] Linking dependencies...
warning "react-native > @react-native/codegen@0.72.7" has unmet peer dependency "@babel/preset-env@^7.1.6".
warning "react-native > @react-native/codegen > jscodeshift@0.14.0" has unmet peer dependency "@babel/preset-env@^7.1.6".
warning "react-native > @react-native-community/cli > @react-native-community/cli-plugin-metro > metro-react-native-babel-transformer@0.76.8" has unmet peer dependency "@babel/core@*".
warning " > react-native-reanimated@3.8.1" has unmet peer dependency "@babel/core@^7.0.0-0".
warning "react-native-reanimated > @babel/plugin-transform-arrow-functions@7.24.1" has unmet peer dependency "@babel/core@^7.0.0-0".        
warning "react-native-reanimated > @babel/plugin-transform-nullish-coalescing-operator@7.24.1" has unmet peer dependency "@babel/core@^7.0.0-0".
warning "react-native-reanimated > @babel/plugin-transform-optional-chaining@7.24.1" has unmet peer dependency "@babel/core@^7.0.0-0".      
warning "react-native-reanimated > @babel/plugin-transform-shorthand-properties@7.24.1" has unmet peer dependency "@babel/core@^7.0.0-0".   
warning "react-native-reanimated > @babel/plugin-transform-template-literals@7.24.1" has unmet peer dependency "@babel/core@^7.0.0-0".      
warning "react-native-reanimated > @babel/preset-typescript@7.24.1" has unmet peer dependency "@babel/core@^7.0.0-0".
warning "react-native-reanimated > @babel/preset-typescript > @babel/plugin-syntax-jsx@7.24.1" has unmet peer dependency "@babel/core@^7.0.0-0".
warning "react-native-reanimated > @babel/preset-typescript > @babel/plugin-transform-modules-commonjs@7.24.1" has unmet peer dependency "@babel/core@^7.0.0-0".
warning "react-native-reanimated > @babel/preset-typescript > @babel/plugin-transform-typescript@7.24.4" has unmet peer dependency "@babel/core@^7.0.0-0".
warning "react-native-reanimated > @babel/preset-typescript > @babel/plugin-transform-typescript > @babel/helper-create-class-features-plugin@7.24.4" has unmet peer dependency "@babel/core@^7.0.0".
warning "react-native-reanimated > @babel/preset-typescript > @babel/plugin-transform-typescript > @babel/plugin-syntax-typescript@7.24.1" has unmet peer dependency "@babel/core@^7.0.0-0".
warning "react-native-reanimated > @babel/preset-typescript > @babel/plugin-transform-typescript > @babel/helper-create-class-features-plugin > @babel/helper-replace-supers@7.24.1" has unmet peer dependency "@babel/core@^7.0.0".
[4/4] Building fresh packages...
[1/4] Resolving packages...
[2/4] Fetching packages...
[3/4] Linking dependencies...
[4/4] Building fresh packages...
$ cd ios && bundle install && bundle exec pod install
Bundler 2.5.9 is running, but your lockfile was generated with 2.3.22. Installing Bundler 2.3.22 and restarting using that version.
Fetching gem metadata from https://rubygems.org/.
Fetching bundler 2.3.22
Installing bundler 2.3.22
Fetching gem metadata from https://rubygems.org/.......
Fetching minitest 5.17.0
Fetching concurrent-ruby 1.2.0
Fetching public_suffix 4.0.7
Fetching rexml 3.2.5
Fetching zeitwerk 2.6.7
Fetching httpclient 2.8.3
Installing zeitwerk 2.6.7
Installing rexml 3.2.5
Installing public_suffix 4.0.7
Installing minitest 5.17.0
Installing httpclient 2.8.3
Installing concurrent-ruby 1.2.0
Using json 2.6.3
Fetching atomos 0.1.3
Installing atomos 0.1.3
Using bundler 2.3.22
Fetching claide 1.1.0
Installing claide 1.1.0
Fetching fuzzy_match 2.0.4
Fetching nap 1.1.0
Installing fuzzy_match 2.0.4
Fetching netrc 0.11.0
Installing nap 1.1.0
Fetching ffi 1.15.5
Installing netrc 0.11.0
Fetching cocoapods-deintegrate 1.0.5
Fetching cocoapods-downloader 1.6.3
Installing cocoapods-deintegrate 1.0.5
Fetching cocoapods-search 1.0.1
Installing cocoapods-downloader 1.6.3
Fetching cocoapods-try 1.2.0
Installing cocoapods-search 1.0.1
Fetching colored2 3.1.2
Installing cocoapods-try 1.2.0
Installing ffi 1.15.5 with native extensions
Fetching escape 0.0.4
Installing colored2 3.1.2
Installing escape 0.0.4
Fetching fourflusher 2.3.1
Fetching gh_inspector 1.1.3
Fetching molinillo 0.8.0
Installing fourflusher 2.3.1
Fetching ruby-macho 2.5.1
Installing gh_inspector 1.1.3
Installing molinillo 0.8.0
Installing ruby-macho 2.5.1
Fetching nanaimo 0.3.0
Fetching addressable 2.8.1
Fetching CFPropertyList 3.0.6
Fetching algoliasearch 1.27.5
Fetching cocoapods-plugins 1.0.0
Installing nanaimo 0.3.0
Installing addressable 2.8.1
Installing CFPropertyList 3.0.6
Installing cocoapods-plugins 1.0.0
Installing algoliasearch 1.27.5
Fetching cocoapods-trunk 1.6.0
Fetching i18n 1.12.0
Fetching tzinfo 2.0.6
Installing cocoapods-trunk 1.6.0
Installing i18n 1.12.0
Installing tzinfo 2.0.6
Fetching xcodeproj 1.22.0
Installing xcodeproj 1.22.0
Fetching activesupport 6.1.7.2
Installing activesupport 6.1.7.2
Fetching ethon 0.16.0
Installing ethon 0.16.0
Fetching typhoeus 1.4.0
Installing typhoeus 1.4.0
Fetching cocoapods-core 1.11.3
Installing cocoapods-core 1.11.3
Fetching cocoapods 1.11.3
Installing cocoapods 1.11.3
Fetching cocoapods-check 1.1.0
Installing cocoapods-check 1.1.0
Bundle complete! 2 Gemfile dependencies, 39 gems now installed.
Bundled gems are installed into `./vendor/bundle`
Post-install message from algoliasearch:
A new major version is available for Algolia! Please now use the https://rubygems.org/gems/algolia gem to get the latest features.
Auto-linking React Native modules for target `VisionCameraExample`: RNGestureHandler, RNReanimated, RNScreens, RNStaticSafeAreaInsets, RNVectorIcons, react-native-blur, react-native-cameraroll, react-native-mmkv, react-native-safe-area-context, react-native-skia, react-native-video, and react-native-worklets-core
Framework build type is static library

[!] Invalid `Podfile` file: [!] Unable to locate the executable `mkdir`.

 #  from C:/Users/carol/Desktop/VISION/react-native-vision-camera/package/example/ios/Podfile:26
 #  -------------------------------------------
 #    end
 >  end
 #  # Resolve react_native_pods.rb with node to allow for hoisting
 #  -------------------------------------------
error Command failed with exit code 1.
info Visit https://yarnpkg.com/en/docs/cli/run for documentation about this command.
error Command failed with exit code 1.
info Visit https://yarnpkg.com/en/docs/cli/run for documentation about this command.

Project dependencies

{
  "name": "react-native-vision-camera",
  "version": "4.0.1",
  "description": "A powerful, high-performance React Native Camera library.",
  "main": "lib/commonjs/index",
  "module": "lib/module/index",
  "types": "lib/typescript/index.d.ts",
  "react-native": "src/index",
  "source": "src/index",
  "files": [
    "src",
    "react-native.config.js",
    "lib/commonjs",
    "lib/module",
    "lib/typescript",
    "android/build.gradle",
    "android/gradle.properties",
    "android/CMakeLists.txt",
    "android/src",
    "ios/**/*.h",
    "ios/**/*.m",
    "ios/**/*.mm",
    "ios/**/*.cpp",
    "ios/**/*.swift",
    "app.plugin.js",
    "VisionCamera.podspec",
    "README.md"
  ],
  "scripts": {
    "typescript": "tsc --noEmit",
    "lint": "eslint \"**/*.{js,ts,tsx}\"",
    "lint-ci": "yarn lint -f ./node_modules/@firmnav/eslint-github-actions-formatter/dist/formatter.js",
    "start": "cd example && yarn start",
    "build": "bob build",
    "release": "bob build && release-it",
    "pods": "cd example && yarn pods",
    "bootstrap": "yarn && cd example && yarn && yarn pods",
    "check-android": "scripts/ktlint.sh && scripts/clang-format.sh",
    "check-ios": "scripts/swiftlint.sh && scripts/swiftformat.sh && scripts/clang-format.sh",
    "check-js": "yarn lint --fix && yarn typescript",
    "check-cpp": "scripts/clang-format.sh",
    "check-all": "scripts/check-all.sh",
    "clean-ios": "scripts/clean-ios.sh",
    "clean-android": "scripts/clean-android.sh",
    "clean-js": "scripts/clean-js.sh",
    "prepack": "cp ../README.md ./README.md",
    "postpack": "rm ./README.md"
  },
  "keywords": [
    "react",
    "native",
    "camera",
    "react-native",
    "react-native-camera",
    "vision",
    "javascript",
    "typescript",
    "android",
    "ios",
    "library",
    "instagram",
    "snapchat",
    "ai",
    "scanner",
    "qrcode",
    "barcode",
    "qr-code",
    "jsi",
    "worklet",
    "module",
    "frame",
    "processing",
    "realtime"
  ],
  "repository": "https://github.com/mrousavy/react-native-vision-camera",
  "author": "Marc Rousavy <me@mrousavy.com> (https://github.com/mrousavy)",
  "license": "MIT",
  "bugs": {
    "url": "https://github.com/mrousavy/react-native-vision-camera/issues"
  },
  "homepage": "https://react-native-vision-camera.com/",
  "publishConfig": {
    "registry": "https://registry.npmjs.org/"
  },
  "devDependencies": {
    "@expo/config-plugins": "^7.2.5",
    "@jamesacarr/eslint-formatter-github-actions": "^0.2.0",
    "@react-native/eslint-config": "^0.72.2",
    "@react-native/typescript-config": "^0.74.0",
    "@release-it/conventional-changelog": "^7.0.0",
    "@shopify/react-native-skia": "^1.2.3",
    "@types/react": "^18.2.19",
    "@types/react-native": "^0.72.2",
    "eslint": "^8.46.0",
    "eslint-plugin-prettier": "^5.0.0",
    "prettier": "^3.0.1",
    "react": "^18.2.0",
    "react-native": "^0.72.3",
    "react-native-builder-bob": "^0.21.3",
    "react-native-reanimated": "^3.8.1",
    "react-native-worklets-core": "^1.1.1",
    "release-it": "^16.1.3",
    "typescript": "^5.1.6"
  },
  "peerDependencies": {
    "@shopify/react-native-skia": "*",
    "react": "*",
    "react-native": "*",
    "react-native-reanimated": "*",
    "react-native-worklets-core": "*"
  },
  "peerDependenciesMeta": {
    "react-native-worklets-core": {
      "optional": true
    },
    "react-native-reanimated": {
      "optional": true
    },
    "@shopify/react-native-skia": {
      "optional": true
    }
  },
  "release-it": {
    "git": {
      "commitMessage": "chore: release ${version}",
      "tagName": "v${version}"
    },
    "npm": {
      "publish": true
    },
    "github": {
      "release": true
    },
    "plugins": {
      "@release-it/conventional-changelog": {
        "preset": {
          "name": "conventionalcommits",
          "types": [
            {
              "type": "feat",
              "section": "✨ Features"
            },
            {
              "type": "perf",
              "section": "💨 Performance Improvements"
            },
            {
              "type": "fix",
              "section": "🐛 Bug Fixes"
            },
            {
              "type": "chore(deps)",
              "section": "🛠️ Dependency Upgrades"
            },
            {
              "type": "docs",
              "section": "📚 Documentation"
            }
          ]
        }
      }
    }
  },
  "react-native-builder-bob": {
    "source": "src",
    "output": "lib",
    "targets": [
      "commonjs",
      "module",
      [
        "typescript",
        {
          "project": "tsconfig.json"
        }
      ]
    ]
  },
  "packageManager": "yarn@1.22.19+sha1.4ba7fc5c6e704fce2066ecbfb0b0d8976fe62447"
}

VisionCamera Version

4.0.1

Target platforms

iOS

Operating system

Windows

Can you build the VisionCamera Example app?

No, I cannot build the Example app either

Additional information

@allorazz allorazz added the 🔧 build error Issue is related to building VisionCamera in your project label Apr 22, 2024
@mrousavy
Copy link
Owner

react_native_pods.rb

This is react-native specific stuff, not VisionCamera related.

How can you even build for iOS on a windows PC? You need to switch to a mac.

@allorazz
Copy link
Author

Thank you for your prompt response, I was hoping to build with Expo EAS after unpacking the project files.

@mrousavy
Copy link
Owner

[!] Invalid `Podfile` file: [!] Unable to locate the executable `mkdir`.

 #  from C:/Users/carol/Desktop/VISION/react-native-vision-camera/package/example/ios/Podfile:26
 #  -------------------------------------------
 #    end
 >  end
 #  # Resolve react_native_pods.rb with node to allow for hoisting
 #  -------------------------------------------

that path is a Windows path, so you are building on a Windows machine. I don't even know how you managed to run pod install?

@allorazz
Copy link
Author

Yes, I am running the project on a windows PC. I didn't run pod install, the only commands I gave were:

git clone https://github.com/mrousavy/react-native-vision-camera
cd react-native-vision-camera/package
yarn bootstrap

Any advice you have for using EAS to build the Example app would be greatly appreciated!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
🔧 build error Issue is related to building VisionCamera in your project
Projects
None yet
Development

No branches or pull requests

2 participants