I try running npx react-native init AwesomeProject
for Create a new project. I have tested it before, but it created the project without error, but it doesn't work anymore. I had to reinstall nodejs.
Node.js v17.7.1
/usr/local/lib/node_modules/react-native-cli/index.js:302
cli.init(root, projectName);
^
TypeError: cli.init is not a function
at run (/usr/local/lib/node_modules/react-native-cli/index.js:302:7)
at createProject (/usr/local/lib/node_modules/react-native-cli/index.js:249:3)
at init (/usr/local/lib/node_modules/react-native-cli/index.js:200:5)
at Object.<anonymous> (/usr/local/lib/node_modules/react-native-cli/index.js:153:7)
at Module._compile (node:internal/modules/cjs/loader:1099:14)
at Object.Module._extensions..js (node:internal/modules/cjs/loader:1153:10)
at Module.load (node:internal/modules/cjs/loader:975:32)
at Function.Module._load (node:internal/modules/cjs/loader:822:12)
at Function.executeUserEntryPoint [as runMain] (node:internal/modules/run_main:77:12)
at node:internal/main/run_main_module:17:47
Node.js v17.7.1
npm uninstall -g react-native-cliand see if that resolves your issuereact-native-cli -v, there is nothing, but when I typereact-native -v:react-native-cli: 2.0.1 react-native: n/a - not inside a React Native project directoryreact-native -vyou are using the react-native-cli. It says in the output the version as 2.0.1. Have you tried uninstalling it globally using the command in my previous comment? What errors do you get when you try to init project after uninstalling react-native-cli ?