TypeError: cli.init is not a function for react native version 0.70 | GeekofGeeks | cli.init error

preview_player
Показать описание

Need to clean global environments with following commands:

yarn global remove react-native

yarn global remove react-native-cli

npm uninstall -g react-native

npm uninstall -g react-native-cli

check that nothing related to react-native presents in these lists:

yarn global list

npm -g list
install new react-native global

npm install -g react-native-cli
npm install -g react-native

then you can run:

npx react-native init ProjectName

tags:

Thankyou
Рекомендации по теме