title: Why react-native-cli giving errors?
body: <p>I recently installed react native cli globally. When i tried to start a project using <code>react-native init projectname</code> or <code>npx react-native init projectname</code> it started downloading packages and creating the project. After completion it gave this error</p>
  <pre><code>    cli.init(root, projectname);
        ^
  
  typeerror: cli.init is not a function
      at run (c:\users\showbi\appdata\roaming\npm\node_modules\react-native-cli\index.js:302:7)
      at createproject (c:\users\showbi\appdata\roaming\npm\node_modules\react-native-cli\index.js:249:3)
      at init (c:\users\showbi\appdata\roaming\npm\node_modules\react-native-cli\index.js:200:5)
      at object.&lt;anonymous&gt; (c:\users\showbi\appdata\roaming\npm\node_modules\react-native-cli\index.js:153:7)
      at module._compile (node:internal/modules/cjs/loader:1105:14)
      at object.module._extensions..js (node:internal/modules/cjs/loader:1159:10)
      at module.load (node:internal/modules/cjs/loader:981: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
  </code></pre>
  <p>What is causing this problem?</p>