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

Can't resolve module for react-native Android app #66

Open
DiefBell opened this issue Sep 17, 2019 · 4 comments
Open

Can't resolve module for react-native Android app #66

DiefBell opened this issue Sep 17, 2019 · 4 comments

Comments

@DiefBell
Copy link

We're using Geodesy in a React-Native Android app and are trying to upgrade from 1.1.3 to 2.2.0, however when trying to build and run we get the following error:

While trying to resolve module geodesy from file redux\NMEA.js, the package node_modules\geodesy\package.json was successfully found. However, this package itself specifies a main module field that could not be resolved (\node_modules\geodesy\index). Indeed, none of these files exist:

  • node_modules\geodesy\index(.native||.android.js|.native.js|.js|.android.json|.native.json|.json)
  • node_modules\geodesy\index\index(.native||.android.js|.native.js|.js|.android.json|.native.json|.json)

We've got esm installed and updated to Geodesy 2.2.0 with the npm command from the readme. React-native is version 0.52.1.

Any help on this would be massively appreciated, thanks :)

@chrisveness
Copy link
Owner

I'm afraid I'm neither a React user nor an Android developer.

That message seems quite strange: package.json doesn't specify any main file, as the library has no single entry point – is React Native (or Redux) somehow injecting a main field, or something?

Unless you require functionality not available in 1.1.3, the simplest might be to stick with that!

@DiefBell
Copy link
Author

Unfortunately we need the functionality for forcing UTM zones. I'll keep looking around and try to work out the issue

@chrisveness
Copy link
Owner

It might be worth reaching out on Reactiflux if you haven't already. Or possibly redux.

Failing anything else, I might be able to backport the UTM zone override to a v1.1.4, but I'd sooner not revisit version 1!

@DiefBell
Copy link
Author

Our app currently uses DenisCarriere's TypeScript definitions from a few years back so I suspect that that's what's causing the issue. I've reached out to him in his original ticket from 2016, but if not a backport would be massively appreciated!

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