I receive this error in any new module I create with create-react-native-module. None of the posted solutions worked for me.
What worked for me was first making sure to run yarn
in the newly created module folder in order to create node_modules/
(this step is probably obvious). Then, in XCode, select Product -> Scheme -> React instead of the default selection of MyModuleName.