React-native start
Following the instructions for initial setup I stucked when found a red screen with:
ReferenceError: Can't find variable: __fbBatchedBridge (line 1 in the generated bundle)
After reloading it changes and becomes:
Unable to download JS bundle
Than I found an advice for typing react-native start into the console. The result:
react-native start
/local/react_native/android_program1/node_modules/react-native/local-cli/cli.js:74 const setupEnvScript = /^win/.test(process.platform) ^^^^^ SyntaxError: Use of const in strict mode. at Module._compile (module.js:439:25) at Module._extensions..js (module.js:474:10) at Object.require.extensions.(anonymous function) [as .js] (/local/react_native/android_program1/node_modules/react-native/node_modules/babel-core/node_modules/babel-register/lib/node.js:142:7) at Module.load (module.js:356:32) at Function.Module._load (module.js:312:12) at Module.require (module.js:364:17) at require (module.js:380:17) at Object. (/local/react_native/android_program1/node_modules/react-native/cli.js:15:18) at Module._compile (module.js:456:26) at Object.Module._extensions..js (module.js:474:10)
I'm using:
RHEL 7, npm 1.3.6, nodejs 0.10.36 and react-native 0.19.
How can I make it work?
- install node js
- open command promt.
- type: react-native init projectName this command will automatically download all the required dependancies for project.
- open the directory from cmd using cd projectname
- react-native run-android
if u face the error like : make sure you have npm install. then just exicute this command npm install --save
your project will run successfully. hope it work for you..
Comments
Post a Comment