question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Current behavior

Adding Async Storage to RN project produces error

Expected behavior

No error

Repro steps

Initialiaze new project with RN 0.59.10 react-native init --version 0.59.10 TestProject pod init yarn add @react-native-community/async-storage react-native link @react-native-community/async-storage pod install react-native run-ios

Environment

@react-native-community/async-storage”: “^1.5.1” “react”: “16.8.3”, “react-native”: “0.59.10” -IOS

Error Code

info In file included from /Users/home/Desktop/APLIKACE/Test/TestProject/node_modules/@react-native-community/async-storage/ios/RNCAsyncStorage.m:8:
/Users/home/Desktop/APLIKACE/Test/TestProject/node_modules/@react-native-community/async-storage/ios/RNCAsyncStorage.h:8:9: fatal error: 'React/RCTBridgeModule.h' file not found

info #import <React/RCTBridgeModule.h>

error Failed to build iOS project. We ran "xcodebuild" command but it exited with error code 65. To debug build logs further, consider building your app with Xcode.app, by opening TestProject.xcworkspace

** BUILD FAILED **


The following commands produced analyzer issues:
	Analyze /Users/home/Desktop/APLIKACE/Test/TestProject/node_modules/react-native/ReactCommon/jsi/jsi.cpp normal x86_64
	Analyze /Users/home/Desktop/APLIKACE/Test/TestProject/node_modules/react-native/ReactCommon/yoga/yoga/Yoga.cpp normal x86_64
	Analyze /Users/home/Desktop/APLIKACE/Test/TestProject/node_modules/react-native/React/Base/RCTModuleMethod.mm normal x86_64
(3 commands with analyzer issues)

The following build commands failed:
	CompileC /Users/home/Desktop/APLIKACE/Test/TestProject/ios/build/TestProject/Build/Intermediates.noindex/Pods.build/Debug-iphonesimulator/RNCAsyncStorage.build/Objects-normal/x86_64/RNCAsyncStorage.o /Users/home/Desktop/APLIKACE/Test/TestProject/node_modules/@react-native-community/async-storage/ios/RNCAsyncStorage.m normal x86_64 objective-c com.apple.compilers.llvm.clang.1_0.compiler
(1 failure)

package.json

{
  "name": "TestProject",
  "version": "0.0.1",
  "private": true,
  "scripts": {
    "start": "node node_modules/react-native/local-cli/cli.js start",
    "test": "jest"
  },
  "dependencies": {
    "@react-native-community/async-storage": "^1.5.1",
    "react": "16.8.3",
    "react-native": "0.59.10"
  },
  "devDependencies": {
    "@babel/core": "^7.5.4",
    "@babel/runtime": "^7.5.4",
    "babel-jest": "^24.8.0",
    "jest": "^24.8.0",
    "metro-react-native-babel-preset": "^0.55.0",
    "react-test-renderer": "16.8.3"
  },
  "jest": {
    "preset": "react-native"
  }
}

PodFile

platform :ios, '9.0'

target 'TestProject' do
  pod 'RNCAsyncStorage', :path => '../node_modules/@react-native-community/async-storage'

end

target 'TestProject-tvOS' do
  # Pods for TestProject-tvOS

  target 'TestProject-tvOSTests' do
    inherit! :search_paths
  end
end

Issue Analytics

  • State:closed
  • Created 4 years ago
  • Comments:12 (5 by maintainers)

github_iconTop GitHub Comments

2reactions
LukePenkavacommented, Jul 28, 2019

@Krizzu

I am not sure if my repo would be of any help. The error can be reproduced in few minutes in completely new RN project, so reproducing the error might be probably faster.

Without pods the installation works fine and there are no issues using the package, but with pods it does not work. I have to use 0.59.10, since the production app is already using it and upgrading to 0.60 is not possible currently because of other packages.

Steps to repro:

  1. react-native init async --version 0.59.10
  2. cd async
  3. cd ios
  4. pod init
  5. edit podfile to this
platform :ios, '9.0'

target 'async' do
  # Uncomment the next line if you're using Swift or would like to use dynamic frameworks
  # use_frameworks!
  # Pods for async
  1. pod install
  2. cd …
  3. yarn add @react-native-community/async-storage
  4. react-native link @react-native-community/async-storage
  5. cd ios
  6. pod install
  7. cd …
  8. react-native run-ios

Produces this error: error Failed to build iOS project. We ran "xcodebuild" command but it exited with error code 65. To debug build logs further, consider building your app with Xcode.app, by opening async.xcworkspace Metro bundler throw this error:

(node:41039) UnhandledPromiseRejectionWarning: Error: jest-haste-map: Haste module naming collision:
  Duplicate module name: react-native
  Paths: /Users/home/Desktop/APLIKACE/RNTests/test7/async/ios/Pods/React/package.json collides with /Users/home/Desktop/APLIKACE/RNTests/test7/async/node_modules/react-native/package.json

Package.json

{
  "name": "async",
  "version": "0.0.1",
  "private": true,
  "scripts": {
    "start": "node node_modules/react-native/local-cli/cli.js start",
    "test": "jest"
  },
  "dependencies": {
    "@react-native-community/async-storage": "^1.6.1",
    "react": "16.8.3",
    "react-native": "0.59.10"
  },
  "devDependencies": {
    "@babel/core": "^7.5.5",
    "@babel/runtime": "^7.5.5",
    "babel-jest": "^24.8.0",
    "jest": "^24.8.0",
    "metro-react-native-babel-preset": "^0.55.0",
    "react-test-renderer": "16.8.3"
  },
  "jest": {
    "preset": "react-native"
  }
}

I am not able to install the package in last 2 weeks and my production app is on hold because i need to get working the local storage. Any help on installing the package would be greatly appreciated. Thanks a lot.

1reaction
LukePenkavacommented, Aug 19, 2019

@TimonSotiropoulos I have resolved the issue by following Krizzu suggestions here https://github.com/react-native-community/async-storage/issues/91

Read more comments on GitHub >

github_iconTop Results From Across the Web

xcode build fails with error code 65 without indicative message
When the simulator of Xcode 6.4 is open (iOS Simulator 8.4) and I try to start a test from the commandline using Xcode...
Read more >
xcodebuild Exit Code 65 - CircleCI
In your normal development workflow, there is no derived data folder or other files common to Xcode. The working directory won't exist, and...
Read more >
Xcode Exits with Error Code 65 — Missing Linked Library for ...
This is a known React Native issue when developing for iOS devices on Apple Silicon (M1) Macs. You can learn more about this...
Read more >
xcodebuild error code 65 | Apple Developer Forums
Hi, I am having a problem with CI builds when building Unity3d projects. The pipeline first builds the project using Unity which results...
Read more >
How to fix the issue reported by error code "Error 65"
If you have received this warning on your PC, it means that there was a malfunction in your system operation. Error code "Error...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found