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

DatadogSDK/Datadog.modulemap' not found #106

Closed
DrDezmond opened this issue Sep 15, 2021 · 9 comments
Closed

DatadogSDK/Datadog.modulemap' not found #106

DrDezmond opened this issue Sep 15, 2021 · 9 comments
Assignees
Labels
awaiting-reply bug Something isn't working

Comments

@DrDezmond
Copy link

Thanks for taking the time for reporting an issue!

Describe what happened
When tried to build using xcode got this error
fatal error: module map file '/Users/artemyeldinov/Library/Developer/Xcode/DerivedData/aquatyMobile-dwypirnlfstqyyfbtiwxuwdciyni/Build/Products/Debug-iphonesimulator/DatadogSDK/Datadog.modulemap' not found
1 error generated.

Steps to reproduce the issue:
Just try to run xcode build

Describe what you expected:
to build to be crated

Additional context

{
  "name": "aquatymobile",
  "version": "0.0.1",
  "private": true,
  "scripts": {
    "android": "react-native run-android",
    "ios": "react-native run-ios",
    "start": "react-native start",
    "test": "jest",
    "lint": "eslint . --ext .js,.jsx,.ts,.tsx",
    "debug": "open 'rndebugger://set-debugger-loc?host=localhost&port=8081'",
    "build-storybook": "build-storybook",
    "prestorybook": "rnstl",
    "storybook": "start-storybook -p 7007",
    "build-react": "webpack --mode production",
    "start-react": "webpack-dev-server --config ./webpack.config.js --mode development",
    "start-storybook-web": "./node_modules/@storybook/react/bin/index.js",
    "build-storybook-web": "./node_modules/@storybook/react/bin/build.js",
    "storybook-web": "yarn run start-storybook-web"
  },
  "dependencies": {
    "@datadog/mobile-react-native": "^1.0.0-rc2",
    "@datadog/mobile-react-navigation": "^1.0.0-rc2",
    "@react-navigation/bottom-tabs": "^6.0.5",
    "@react-navigation/native": "^6.0.2",
    "@react-navigation/native-stack": "^6.1.0",
    "cocoapods": "^0.0.0",
    "react": "17.0.2",
    "react-native": "0.64.1",
    "react-native-safe-area-context": "^3.3.2",
    "react-native-screens": "^3.6.0",
    "react-native-web": "^0.17.1",
    "react-redux": "^7.2.4",
    "redux": "^4.1.1",
    "redux-devtools-extension": "^2.13.9",
    "redux-saga": "^1.1.3",
    "remote-redux-devtools": "^0.5.16",
    "styled-components": "^5.3.1"
  },
  "devDependencies": {
    "@babel/core": "^7.15.5",
    "@babel/preset-env": "^7.15.6",
    "@babel/preset-react": "^7.14.5",
    "@babel/runtime": "^7.12.5",
    "@react-native-community/eslint-config": "^2.0.0",
    "@storybook/addon-actions": "^6.3.8",
    "@storybook/addon-essentials": "^6.3.8",
    "@storybook/addon-knobs": "^5.3",
    "@storybook/addon-links": "^6.3.8",
    "@storybook/addon-ondevice-actions": "^5.3.23",
    "@storybook/addon-ondevice-knobs": "^5.3.25",
    "@storybook/react": "^6.3.8",
    "@storybook/react-native": "^5.3.25",
    "@storybook/react-native-server": "^5.3.23",
    "@testing-library/jest-native": "^4.0.2",
    "@testing-library/react-native": "^7.2.0",
    "@types/jest": "^26.0.23",
    "@types/react": "^17.0.20",
    "@types/react-dom": "^17.0.9",
    "@types/react-native": "^0.64.5",
    "@types/react-test-renderer": "^16.9.2",
    "@types/remote-redux-devtools": "^0.5.5",
    "@types/styled-components": "^5.1.14",
    "babel-jest": "^26.6.3",
    "babel-loader": "^8.2.2",
    "css-loader": "^6.2.0",
    "eslint": "^7.14.0",
    "html-webpack-plugin": "^5.3.2",
    "jest": "^26.6.3",
    "metro-react-native-babel-preset": "^0.64.0",
    "mini-css-extract-plugin": "^2.3.0",
    "react-dom": "^17.0.2",
    "react-native-storybook-loader": "^2.0.4",
    "react-test-renderer": "17.0.1",
    "source-map-loader": "^3.0.0",
    "storybook-addon-styled-component-theme": "^2.0.0",
    "ts-loader": "^9.1.2",
    "typescript": "^4.4.3",
    "webpack": "^5.52.1",
    "webpack-cli": "^4.8.0",
    "webpack-dev-server": "^4.2.1"
  },
  "resolutions": {
    "@types/react": "^17"
  },
  "config": {
    "react-native-storybook-loader": {
      "searchDir": [
        "./src/components"
      ],
      "pattern": "./**/*.stories.@(js|jsx|ts|tsx)",
      "outputFile": "./storybook/storyLoader.js"
    }
  },
  "jest": {
    "preset": "react-native",
    "setupFiles": [
      "./node_modules/react-native-gesture-handler/jestSetup.js"
    ],
    "transformIgnorePatterns": [
      "node_modules/(?!(jest-)?@?react-native|@react-native-community|@react-navigation)"
    ],
    "setupFilesAfterEnv": [
      "@testing-library/jest-native/extend-expect"
    ],
    "moduleFileExtensions": [
      "ts",
      "tsx",
      "js",
      "jsx",
      "json",
      "node"
    ],
    "globals": {
      "window": {}
    }
  }
}
@DrDezmond DrDezmond added the bug Something isn't working label Sep 15, 2021
@0xnm
Copy link
Contributor

0xnm commented Sep 16, 2021

Hello @DrDezmond. Thanks for reporting the issue. Can you please show the relevant part of your Podfile, specifically do you use use_frameworks? Can you please also try to clean XCode and CocoaPods caches?

@seanbaergen
Copy link

seanbaergen commented Sep 16, 2021

I am getting this when archiving. I do not use use_frameworks. I'm using react-native 0.64.2

Podfile

require_relative '../node_modules/react-native/scripts/react_native_pods'
require_relative '../node_modules/@react-native-community/cli-platform-ios/native_modules'

platform :ios, '11.0'

target 'nativeapp' do
  config = use_native_modules!

  use_react_native!(
    :path => config[:reactNativePath],
    # to enable hermes on iOS, change `false` to `true` and then install pods
    :hermes_enabled => false
  )

  ...

  target 'nativeappTests' do
    inherit! :complete
    # Pods for testing
  end
end

@DrDezmond
Copy link
Author

require_relative '../node_modules/react-native/scripts/react_native_pods'
require_relative '../node_modules/@react-native-community/cli-platform-ios/native_modules'

platform :ios, '12.0'

target 'aquatyMobile' do
  config = use_native_modules!

  use_react_native!(
    :path => config[:reactNativePath],
    # to enable hermes on iOS, change `false` to `true` and then install pods
    :hermes_enabled => false
  )

  target 'aquatyMobileTests' do
    inherit! :complete
    # Pods for testing
  end

  # Enables Flipper.
  #
  # Note that if you have use_frameworks! enabled, Flipper will not work and
  # you should disable the next line.
  use_flipper!()

  post_install do |installer|
    react_native_post_install(installer)
  end
end

I am not using use_frameworks

@0xnm
Copy link
Contributor

0xnm commented Sep 17, 2021

Hello @DrDezmond and @seanbaergen. This looks like an issue with a tooling rather than with SDK. To better understand the issue, can you please give us the following info:

  • Do you build on Intel or M1 laptop?
  • What is the XCode version you are using?
  • Does issue repro if you create empty project with only Datadog dependency?

Can you also check the following issues: facebook/react-native#28503 and facebook/react-native#29605 and try solutions there?

@seanbaergen
Copy link

Updating the Xcode deployment target to match the podfile fixed it for me

@0xnm 0xnm self-assigned this Sep 20, 2021
@DrDezmond
Copy link
Author

@0xnm

  • Yes, building on M1
  • 12.5.1
  • Yes

@buranmert buranmert self-assigned this Sep 22, 2021
@buranmert
Copy link
Contributor

buranmert commented Sep 23, 2021

hi @DrDezmond 👋

i don't have a M1 machine but i managed to reproduce modulemap not found error by building for iOS simulator in Release (Build Active Arch Only = No) config.

can you please try again after disabling Flipper?
disabling Flipper fixed modulemap not found error for me, but then i got other errors in RCTFolly module. i'm hoping that happened because i was trying to build for arm64 in my Intel machine, so let's see if this will work for you

adding these lines below to the post_install in my Podfile solved the issue for me:

post_install do |installer|
  ...
  installer.pods_project.targets.each do |target|
    target.build_configurations.each do |config|
      config.build_settings['IPHONEOS_DEPLOYMENT_TARGET'] = '11.0'
     end
  end

i got the snippet from this comment in the pinned React Native issue, you may also want to use the whole snippet (i posted only the required part here)

@buranmert
Copy link
Contributor

hey @DrDezmond, it's been a while without any update on this issue.
i'm closing the issue assuming it is solved. if the issue persists, please feel free to re-open.

@tamlyn
Copy link

tamlyn commented Aug 16, 2023

I had this problem and it turned out to be because I had opened my project's .xcodeproj rather than the .xcworkspace in Xcode.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
awaiting-reply bug Something isn't working
Projects
None yet
Development

No branches or pull requests

5 participants