I’m attempting to upgrade from react-native 0.69 to 0.74 and while doing so when I build with Xcode I now get the issue that it cannot find my node_modules folder:
error Unable to resolve module moment from /Users/xx/apps/xxx/index.js: moment could not be found within the project or in these directories:
node_modules
../../node_modules
Nothing in the setup for node_modules etc seems to have changed as part of the upgrade. If I remove e.g. moment
from the app it just fails on the next dependency instead, It’s not an issue with the installation of node_modules themselves and I have run yarn install
, etc.
I have attempted setting the rootPath
in the metro config for the project to the explicit folder but that makes the metro fail on the sha1 for index.js
instead.
Any suggestions on what might cause Xcode not to find the node_modules folders?