Syntaxerror: Unexpected Token React-native Init
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/
Solution 1:
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
Solution 2:
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
Solution 3:
So I completely uninstalled Node
then reinstalled it and react-native-cli
and it worked correctly.
Solution 4:
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
Post a Comment for "Syntaxerror: Unexpected Token React-native Init"