'IOS Archiving fails (React Native) while Debug working fine

Im trying to archive an IOS build.

its working perfectly when running as debug build.

"react-natuve run-ios"

when i try to archive , Its throwing below error.

Xcode/DerivedData/appname-crvjvqqnpdxpwkfkxccvnxunhhkw/Build/Intermediates.noindex/ArchiveIntermediates/appname-app/BuildProductsPath/Release-iphoneos/appname.app/main.jsbundle does not exist. This must be a bug with'

please let me know how i can fix this..



Sources

This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.

Source: Stack Overflow

Solution Source