Issue
While crreating new project using - npx react-native init AwesomeProject failed in node version 18.18.0 but succeed in node version 16.20.1.
Image link: error image which I encountered
I've tried
1)sudo npm uninstall -g react-native-cli @react-native-community/cli
2)npx react-native bundle --platform android --dev false --entry-file index.js --bundle-output android/app/src/main/assets/index.android.bundle --assets-dest android/app/src/main/res
Solution
Solution:
It Occurs because the React Native init means the latest version.
The Latest version only supports the latest node version when we try to install the older version it shows the Error.
And the node_modules is also dependent to node,and Java and android studio files like sdk,build_tools etc... Make Sure the environmental setup is correctly setuped!
That's Why
npx react-native init AwesomeProject
failed in node version 18 but succeed in node version 16.
Answered By - Ashif AL
0 comments:
Post a Comment
Note: Only a member of this blog may post a comment.