-
Notifications
You must be signed in to change notification settings - Fork 61
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
node Error: Cannot find module 'react-native-activity-view' #51
Comments
It also breaks with flow. |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
I've installed react-native-activity-view in my project with
npm i --save react-native-activity-view
then when trying to resolve the module with node I get:I actually first noticed this using
eslint
, but in fact the issue occurs at the node level:with
import ActivityView from 'react-native-activity-view';
at the top ofRoot.js
.This happens because node uses the
"main"
element of package.json:ActivityView
to try to find thereact-native-activity-view/ActivityView
file which doesn't exist.Usually
"main"
references anindex.js
file, that might be a solution if you can manage the iOS vs unsupported Android issue.Setting
"main": "ActivityView.ios.js"
in package.json is a temporary workaround.On our side we used the following workaround in
.eslintrc
:Thanks!
The text was updated successfully, but these errors were encountered: