Reputation: 663
Hello I am getting an issue when trying to run react-native init
.
SyntaxError: Unexpected token ...
/Users/jordan/Projects/React/LiveInstagram/node_modules/metro-bundler/build/lib/TerminalClass.js:141
this._nextStatusStr = util.format(format, ...args);
Does anyone know how I can remedy this issue? Thanks!
Upvotes: 1
Views: 7506
Reputation: 51
I had an older node version. so upgraded to 18.17.1 and worked for react native 0.72.5
Upvotes: 0
Reputation: 652
Currently it works for me with node v8. My solution:
sudo npm install -g npm
sudo npm cache clean -f
sudo npm install -g n
sudo n stable
Upvotes: 2
Reputation: 566
There are compatibility issues in the updated react-native cli. Using the downgraded version solves this problem. $ react-native init [project name] --version 0.38.0
https://github.com/facebook/react-native/issues/11384
Upvotes: 2
Reputation: 21
I had the same problem with nodejs v4, solve this by updating nodejs and npm.
sudo purge nodejs npm
curl -sL https://deb.nodesource.com/setup_8.x | sudo -E bash -
sudo apt-get install -y nodejs
Upvotes: 0
Reputation: 663
So I completely uninstalled Node
then reinstalled it and react-native-cli
and it worked correctly.
Upvotes: 0