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

Unable resolve module react-native/Libraries/Components/StaticContainer.react #13545

Closed
unfernandito opened this issue Apr 17, 2017 · 8 comments
Labels
Resolution: Locked This issue was locked by the bot.

Comments

@unfernandito
Copy link

Hi, i have this error when i try compile my app for debug

Transforming modules  ▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓░  99.6% (976/979)...(node:14514) UnhandledPromiseRejectionWarning: Unhandled promise rejection (rejection id: 2723): UnableToResolveError: Unable to resolve module `react-native/Libraries/Components/StaticContainer.react` from `/home/unfernandito/Luis/Proyectos/WeHaus/WeHaus-App/Old-Wehaus/node_modules/native-base/dist/src/basic/Tabs/SceneComponent.js`: Module does not exist in the module map or in these directories:
  /home/unfernandito/Luis/Proyectos/WeHaus/WeHaus-App/Old-Wehaus/node_modules/native-base/node_modules/react-native/Libraries/Components
,   /home/unfernandito/Luis/Proyectos/WeHaus/WeHaus-App/Old-Wehaus/node_modules/react-native/Libraries/Components
,   /home/unfernandito/Luis/Proyectos/node_modules/react-native/Libraries/Components

these are my package.json:
{ "name": "Wehaus", "version": "1.0.12", "private": true, "scripts": { "start": "node node_modules/react-native/local-cli/cli.js start", "test": "jest", "devtools": "react-devtools" }, "dependencies": { "buffer": "^5.0.5", "events": "^1.1.1", "faye": "^1.2.4", "halley": "^0.4.7", "lodash": "^4.17.4", "native-base": "^2.1.2", "pusher": "^1.5.1", "pusher-js": "^4.0.0", "react": "15.4.2", "react-native": "^0.42.0", "react-native-action-button": "^2.6.0", "react-native-android-voice": "^0.5.1", "react-native-android-wifi": "0.0.13", "react-native-animatable": "^1.1.1", "react-native-app-intro": "^1.1.5", "react-native-chart": "^1.0.8-beta", "react-native-chooser": "^1.4.0", "react-native-easy-grid": "^0.1.8", "react-native-elements": "^0.9.7", "react-native-firestack": "^2.3.9", "react-native-fit-image": "^1.4.7", "react-native-highcharts": "^0.2.0", "react-native-linear-gradient": "^2.0.0", "react-native-loading-spinner-overlay": "^0.4.2", "react-native-modal-picker": "0.0.16", "react-native-net-state": "^1.1.2", "react-native-parallax-view": "^2.0.6", "react-native-pathjs-charts": "0.0.26", "react-native-responsive-dimensions": "^1.0.1", "react-native-responsive-image": "^2.0.2", "react-native-rest-client": "^0.1.1", "react-native-shake-event": "^3.0.0", "react-native-sortable-listview": "^0.2.2", "react-native-splash-screen": "^2.0.0", "react-native-store": "^0.4.1", "react-native-swiper": "^1.5.4", "react-native-textinput-effects": "^0.3.0", "react-native-touch-id": "^3.0.0", "react-native-vector-icons": "^4.0.0", "react-navigation": "^1.0.0-beta.5", "react-redux": "^5.0.3", "redux": "^3.6.0", "restler": "^3.4.0", "util": "^0.10.3" }, "devDependencies": { "babel-jest": "19.0.0", "babel-preset-react-native": "1.9.1", "flow-bin": "^0.42.0", "jest": "19.0.2", "react-devtools": "^2.0.12", "react-test-renderer": "15.4.2" }, "jest": { "preset": "react-native" } }

@jonathanroze
Copy link

Open SceneComponent.js in ~/node_modules/native-base/dist/src/basic/Tabs/

and change line 6 from

var StaticContainer=require('react-native/Libraries/Components/StaticContainer.react');

to

var StaticContainer=require('react-native/Libraries/Components/StaticContainer');

Don't forget to perform a npm start -- --reset-cache

It works for me !

Source : http://stackoverflow.com/questions/43453525/react-native-not-generating-file-for-android

@fxfactorial
Copy link
Contributor

Also issue for me, but this is native base's issue, not react-native

@unfernandito
Copy link
Author

@Clowning works for me, thanks you!

@brascene
Copy link

Wow @Clowning , thank you so much!

@jonathanroze
Copy link

@unfernandito @brascene You're welcome :-)

@unfernandito
Copy link
Author

@Clowning Thanks you ;-)

@pierre-H
Copy link

Thank you !!!

@smitthakkar1
Copy link

I was getting this error and it was a silly mistake. I'm sure most of you don't do this:

I was importing the file like this : import file from 'file';
But actual way was : import file from './file';

That works.
P.S. I also run the command "yarn" before doing above change.

@facebook facebook locked as resolved and limited conversation to collaborators May 24, 2018
@react-native-bot react-native-bot added the Resolution: Locked This issue was locked by the bot. label Jul 18, 2018
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
Resolution: Locked This issue was locked by the bot.
Projects
None yet
Development

No branches or pull requests

7 participants