I had the same issue while building a node module and trying that in the test app.
I solved it by closing and restarting the metro bundler.
The other methods I tried (but did not work for me):
- react-native upgrade
- unlink and link the module
- uninstalling the package and reinstalling.
Hope it was helpful! Cheers!