Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

A main module field that could not be resolved #31

Closed
Malkom opened this issue May 9, 2020 · 3 comments
Closed

A main module field that could not be resolved #31

Malkom opened this issue May 9, 2020 · 3 comments

Comments

@Malkom
Copy link

Malkom commented May 9, 2020

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 ?

@prescottprue
Copy link
Owner

prescottprue commented May 11, 2020

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?

@Malkom
Copy link
Author

Malkom commented May 11, 2020

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",

@prescottprue
Copy link
Owner

Solved by v0.7.2 release

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants