prescottprue/react-google-button

A `main` module field that could not be resolved

Malkom opened this issue · 3 comments

Hi,

I've got an error on compiling my app :

While trying to resolve module react-google-button from file /var/www/apps/BUM-P/Bump/Components/Search.js, the package /var/www/apps/BUM-P/Bump/node_modules/react-google-button/package.json was successfully found. However, this package itself specifies a main module field that could not be resolved (/var/www/apps/BUM-P/Bump/node_modules/react-google-button/lib/index.js

I don't have directory named lib in the react-google-button dir, just a "src" dir.

Is it a bug ?

Yeah, it looks like it might be a bug from when the build setup was upgraded. We are only publishing dist and es builds, so that path should be updated to es/index.js like the module field specifies. Surprise this hasn't come up sooner, guess that create-react-app is picking up the module field instead?

Out of curiosity, what build setup are you using?

Here a copy of a part of my package.json :

"react": "^16.10.2",
    "react-dom": "^16.9.0",
    "react-geocode": "^0.1.2",
    "react-google-button": "^0.7.1",
    "react-headroom": "^2.2.8",
    "react-native": "https://github.com/expo/react-native/archive/sdk-34.0.2.tar.gz",
    "react-native-24h-timepicker": "^1.0.0",
    "react-native-checkbox-form": "^1.1.5",
    "react-native-deprecated-custom-components": "^0.1.2",
    "react-native-gesture-handler": "~1.3.0",
    "react-native-linear-gradient": "^2.5.6",
    "react-native-map-clustering": "^2.0.2",
    "react-native-maps": "^0.24.2",
    "react-native-navigation": "^2.27.9",
    "react-native-ratings": "^6.5.0",
    "react-native-slider": "^0.11.0",
    "react-native-swipe-gestures": "^1.0.4",
    "react-native-unimodules": "^0.5.2",
    "react-native-web": "^0.11.7",
    "react-navigation": "^3.13.0",