[Solved] : However, this package itself specifies a `main` module field

This is a commonly faced issue on React Native. Normally with react-navigation.

.....However, this package itself specifies a `main` module field...

This happens whenever we try to install a new package without stopping the metro server.

Solution :

Following are possible solutions for this issue :

  1. Go to the iOS folder and do pod install.
  2. Stop the metro server and restart it.
  3. Delete node_modules directory and run npm install to reinstall all dependencies.