DEV Community

Nguyễn Hữu Hiếu
Nguyễn Hữu Hiếu

Posted on • Edited on

react-native issues: module map file not found

Issue

Issue

=> Because of XCode cache our library

Solution

Step 1: Open Xcode

  • Product > Clean Build Folder
  • Close Project

Step 2: Remove node_modules and Pods



cd /<project-name> && rm -rf node_modules

cd /ios && rm -rf Pods


Enter fullscreen mode Exit fullscreen mode

Step 3. Remove cache



cd /Users/<computer name>/Library/Developer/Xcode/DerivedData

rm -rf ***-cnjsxtawhwknragbiskdnvolmcxm


Enter fullscreen mode Exit fullscreen mode

Step 4: Re-install node_module && pod



cd /<project-name>
yarn 

cd /ios && pod install


Enter fullscreen mode Exit fullscreen mode

Step 5: Open Xcode

  • Waiting indexing done (we still got error but after indexing everything will correct) XCode Indexing

Step 6: Edit pod file

  • not use_flipper
  • exclude architecture arm64 ```Podfile

# 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)
__apply_Xcode_12_5_M1_post_install_workaround(installer)
installer.pods_project.build_configurations.each do |config| config.build_settings["EXCLUDED_ARCHS[sdk=iphonesimulator*]"] = "arm64"
end
end

Enter fullscreen mode Exit fullscreen mode

Top comments (0)