Я пытаюсь установить React-native для моего ubuntu 14.04. Я успешно установил react-native-cli
, но когда я пытаюсь запустить react-native init reactApp
trene ошибка:React-native init error
[email protected]:~$ node -v
v0.12.7
[email protected]:~$ react-native init reactApp
prompt: Directory reactApp already exist. Continue?: (no) y
This will walk you through creating a new React Native project in /home/pavlov/reactApp
Installing react-native package from npm...
You are currently running Node v0.12.7 but React Native requires >=4. Please use a supported version of Node.
See https://facebook.github.io/react-native/docs/getting-started.html
/home/pavlov/reactApp/node_modules/react-native/local-cli/cli.js:56
const setupEnvScript = /^win/.test(process.platform)
^^^^^
SyntaxError: Use of const in strict mode.
at exports.runInThisContext (vm.js:73:16)
at Module._compile (module.js:443:25)
at Module._extensions..js (module.js:478:10)
at Object.require.extensions.(anonymous function) [as .js] (/home/pavlov/reactApp/node_modules/babel-core/lib/api/register/node.js:214:7)
at Module.load (module.js:355:32)
at Function.Module._load (module.js:310:12)
at Module.require (module.js:365:17)
at require (module.js:384:17)
at Object.<anonymous> (/home/pavlov/reactApp/node_modules/react-native/cli.js:15:18)
at Module._compile (module.js:460:26)
Как я могу это исправить?
Вы пробовали модернизировать узел? React Native требует> = 4 –
см. Http://stackoverflow.com/questions/10075990/upgrading-node-js-to-latest-version – Arvind