The command create-react-native-app app-name cannot complete the installation process successfully
I expect the installation to complete successfully , a message of "Happy hacking" should appear.
I've tried to completely uninstalling node, but nothing has changed.
$ create-react-native-app plathat
Creating a new React Native app in C:\Users\Bato\Desktop\reactApp\plathat.
Using package manager as yarnpkg with yarn interface.
Installing packages. This might take a couple minutes.
Installing react-native-scripts...
yarn add v1.9.4
info No lockfile found.
[1/4] Resolving packages...
[2/4] Fetching packages...
[3/4] Linking dependencies...
[4/4] Building fresh packages...
success Saved lockfile.
success Saved 20 new dependencies.
info Direct dependencies
โโ [email protected]
info All dependencies
โโ [email protected]
โโ [email protected]
โโ [email protected]
โโ [email protected]
โโ [email protected]
โโ [email protected]
โโ [email protected]
โโ [email protected]
โโ [email protected]
โโ [email protected]
โโ [email protected]
โโ [email protected]
โโ [email protected]
โโ [email protected]
โโ [email protected]
โโ [email protected]
โโ [email protected]
โโ [email protected]
โโ [email protected]
โโ [email protected]
Done in 20.16s.
(node:3528) UnhandledPromiseRejectionWarning: Error: Cannot find module 'C:\Users\Bato\Desktop\reactApp\plathat\node_modules\react-native-scripts\build\scripts\init.js'
at Function.Module._resolveFilename (module.js:548:15)
at Function.Module._load (module.js:475:25)
at Module.require (module.js:597:17)
at require (internal/module.js:11:18)
at _callee2$ (C:\Users\Bato\AppData\Roaming\npm\node_modules\create-react-native-app\build\index.js:128:32)
at tryCatch (C:\Users\Bato\AppData\Roaming\npm\node_modules\create-react-native-app\node_modules\regenerator-runtime\runtime.js:62:40)
at Generator.invoke [as _invoke] (C:\Users\Bato\AppData\Roaming\npm\node_modules\create-react-native-app\node_modules\regenerator-runtime\runtime.js:296:22)
at Generator.prototype.(anonymous function) [as next] (C:\Users\Bato\AppData\Roaming\npm\node_modules\create-react-native-app\node_modules\regenerator-runtime\runtime.js:114:21)
at step (C:\Users\Bato\AppData\Roaming\npm\node_modules\create-react-native-app\node_modules\babel-runtime\helpers\asyncToGenerator.js:17:30)
at C:\Users\Bato\AppData\Roaming\npm\node_modules\create-react-native-app\node_modules\babel-runtime\helpers\asyncToGenerator.js:28:13
(node:3528) UnhandledPromiseRejectionWarning: Unhandled promise rejection. This error originated either by throwing inside of an async function without a catch block, or by rejecting a promise which was not handled with .catch(). (rejection id: 1)
(node:3528) [DEP0018] DeprecationWarning: Unhandled promise rejections are deprecated. In the future, promise rejections that are not handled will terminate the Node.js process with a non-zero exit code.
Please run these commands in the project folder and fill in their results:
npm ls react-native-scripts:npm ls react-native:npm ls expo:node -v:npm -v:yarn --version:watchman version:Same here!
โข node -v:v8.9.0
โข npm -v:v6.4.1
โข yarn --version:v1.9.4
โข watchman version:v4.7.0
โข Operating system: macOS High Sierra
Had to use Expo CLI's โฏ expo init.
because it is over, shame , you have to use the new create-react-native-app with new expo cli instead of react-native-scripts and it is a mess
Having the same issue
I was so shocked after finding this fact. But still thanks @EVALIJANI 's comment
@EVALIJANI can you explain how to use it with the new expo cli?
Edit: Never mind, looked on the README of create-react-native-app: https://github.com/react-community/create-react-native-app
Had to run the following commands:
$ npm install -g expo-cli
$ expo init my-app
$ cd my-app/
$ npm start
I'm getting this error
'Input is required, but expo is in non-interactive mode.'
Can somebody please help me out
I solved it by running
npm install -g create-react-native-app
select blank project
create-react-native-app AwesomeProject
Why aren't docs updated with changes? @hramos
@pikapikaa fix is to update the docs with new instructions.
@morenoh149 please send a PR to https://github.com/facebook/react-native-website to update the docs
First Dont run in git bash program, run in cmd.exe.
i start to install it globally, like :
npm install -g expo-clinpm install -g watchmanthen i start to install the project using this :
npm install -g create-react-native-appcreate-react-native-app AwesomeProjectNow you can do :
cd AwesomeProjectexpo startit solved for me.
@ujjalacharya try
expo init youappfolder --template blank
The error occurs, because the create-react-native-app is using the wrong version of react-native-scripts. It uses the last stable version of react-native-scripts, which is 2.01. This version does not contain the init.js file mentioned in the error message.
To fix the error, we need to use a version of react-native-scripts that is compatible with create-react-native-app. Version 1.4.0 of react-native-scripts seems to be compatible as it was released a few months after create-react-native-app.
So to create a new project using create-react-native-app, use the command: create-react-native-app --scripts-version 1.4.0 [project-name]. This solution worked with create-react-native-app version 1.0.0
Most helpful comment
@EVALIJANI can you explain how to use it with the new expo cli?
Edit: Never mind, looked on the README of create-react-native-app: https://github.com/react-community/create-react-native-app
Had to run the following commands:
$ npm install -g expo-cli
$ expo init my-app
$ cd my-app/
$ npm start