react-native init 创建失败,提示:unexpected token...
来源:2-1 本地环境搭建
![](http://img1.sycdn.imooc.com/user/5576f3640001cfd507500420-100-100.jpg)
hackingangle
2017-09-01
This will walk you through creating a new React Native project in /Users/wanggang/react/imoocApp
Installing react-native package from npm...
/Users/wanggang/react/imoocApp/node_modules/react-native/node_modules/metro-bundler/src/lib/Terminal.js:141
this._nextStatusStr = util.format(format, ...args);
^^^
SyntaxError: Unexpected token ...
环境如下:
☁ react # node
node -v
# npm
npm -v
v4.2.3
2.14.7
☁ react
☁ react react-native -v
react-native-cli: 0.1.10
写回答
1回答
-
Scott
2017-09-04
升级 Node 到 8.x 版本,然后按照官方这个来呢
https://facebook.github.io/react-native/docs/getting-started.html
代码的思路可以参考课程,版本的话,可以用较新的版本了
00
相似问题