Create-react-native-app: UnhandledPromiseRejectionWarning: can not create app folder and start installation

Created on 23 Sep 2018  Â·  5Comments  Â·  Source: expo/create-react-native-app

Description

The command create-react-native-app app-name cannot create app folder and start installation

Observed Behavior

$ create-react-native-app AwesomeProject                                                                                                                                       
(node:1490) UnhandledPromiseRejectionWarning: Unhandled promise rejection (rejection id: 2): Error: spawn ENOTDIR
(node:1490) [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.

$ cd AwesomeProject                                                                                                                                                            
cd: no such file or directory: AwesomeProject

Environment

Please run these commands in the project folder and fill in their results:

  • npm ls react-native-scripts: empty
  • npm ls react-native: empty
  • npm ls expo: empty
  • node -v: v8.9.1
  • npm -v: 6.4.1
  • yarn --version: 1.7.0
  • watchman version: command not found: watchman

Also specify:

  1. Operating system: macOs 10.13.4
  2. Phone/emulator/simulator & version: -
moving-to-expo-cli

All 5 comments

Check the readme file,looks like create-react-native-app is replaced with new expo-cli. Just figured it.

@yolossn Thanks. But readme also says

The create-react-native-app command is provided for backwards compatibility.

So it should work and I think its worth to open an issue.

Also getting started section in facebook RN docs have old way of creating RN app

Yes, backward compatibility must be insured ! As you said, even the React Native documentation is not up to date.
A new developer on React Native types 2 lines of command and is already blocked, I understand why many beginners are giving up.
We create a React JS app with:
create-react-app myapp
and React Native app with:
expo init myapp
So logical ¯_(ツ)_/¯

Same issue here. It took me several days to figure out what the issues were. Make sure you're using create-react-native-app @ v2. I got the UnhandledPromiseRejectionWarning: when trying to use anything below the new v2. Then follow the steps I've outlined in the issue linked below to fix all of the other bugs/issues that were introduced when they merged create-react-native-app with Expo a few days ago. Mopst of these other issues are relevant only if you eject the app.

See this issue for fixes
https://github.com/react-community/create-react-native-app/issues/777

@caseychoiniere Thanks, I updated my CRNA CLI to v2 and everything is working.

Was this page helpful?
0 / 5 - 0 ratings