react-native 不支持 node v4.2.3 了!!!
来源:2-2 忍不住尝尝鲜
qml123
2018-09-12
react-native init imoocApp
This will walk you through creating a new React Native project in /Users/lafa/Projects/imoocApp
Installing react-native package from npm…
You are currently running Node v4.2.3 but React Native requires >=8. Please use a supported version of Node. See https://facebook.github.io/react-native/docs/getting-started.html
/Users/lafa/Projects/imoocApp/node_modules/react-native/local-cli/server/checkNodeVersion.js:43
);
^
SyntaxError: Unexpected token )
at exports.runInThisContext (vm.js:53:16)
at Module._compile (module.js:414:25)
at Object.Module._extensions…js (module.js:442:10)
at Module.load (module.js:356:32)
at Function.Module._load (module.js:311:12)
at Module.require (module.js:366:17)
at require (module.js:385:17)
at Object. (/Users/lafa/Projects/imoocApp/node_modules/react-native/local-cli/cli.js:17:1)
at Module._compile (module.js:435:26)
at Object.Module._extensions…js (module.js:442:10)
1回答
-
Scott
2018-09-13
恩,可以把 Nodejs 升级下版本,比如升到 8.x
042018-09-14
相似问题