I had the same issue. My solution was to add the js
extension to the packagerOpts.sourceExts
array in the app.json file. I only had ["ts", "tsx"]
in there, but after changing it to ["js", "ts", "tsx"]
the error disappeared and my app built again.
4 Likes