create-react-native-app fails to create project on Ubuntu with yarn
See original GitHub issueDescription
I’m having errors trying to initialize a react-native app with this package.
Expected Behavior
If I run create-react-native-app Sauce
, it should generate all the files needed for the app.
Observed Behavior
It throws an error while getting the files, then generates only a package.json file
What actually happened when you performed the above actions? It didn’t work.
If there’s an error message, please paste the full terminal output and error message in this code block:
create-react-native-app saucecodemobile
Creating a new React Native app in /home/leksyib/Desktop/saucecodemobile.
Using package manager as yarnpkg with yarn interface.
Installing packages. This might take a couple minutes.
Installing react-native-scripts...
yarn add v1.3.2
info No lockfile found.
[1/4] Resolving packages...
warning react-native-scripts > xdl > auth0-js > xtend > object-keys@0.4.0:
[2/4] Fetching packages...
[#####################################################################] 438/439^(node:4524) UnhandledPromiseRejectionWarning: Error: ENOENT: no such file or directory, open '/home/leksyib/Desktop/saucecodemobile/node_modules/react-native-scripts/package.json'
(node:4524) 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:4524) [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.
Environment
OS: Ubuntu. Node: v9.3.0 Creact-react-native-app: latest.
Please run these commands in the project folder and fill in their results:
npm ls react-native-scripts
: `-- (empty)npm ls react-native
: – react-native@0.49.3npm ls expo
: `-- (empty)node -v
: 9.3.0npm -v
: 5.6.0yarn --version
: 1.3.2watchman version
: watchman: command not found
Also specify:
-
Operating system: Ubuntu
-
Phone/emulator/simulator & version: Infinix Note 3, nougat.
Reproducible Demo
Please provide a minimized reproducible demonstration of the problem you’re reporting.
Issues that come with minimal repro’s are resolved much more quickly than issues where a maintainer has to reproduce themselves.
Issue Analytics
- State:
- Created 6 years ago
- Comments:12 (4 by maintainers)
Top GitHub Comments
I just tried create-react-native-app for the first time today, and experienced the same behavior/error on macOS High Sierra + Node 9.3.0 (installed with nvm) 🤔
Looks like something was going wrong during the “Fetching packages” phase of the initial
yarn add
. The progress bar was stuck at 441/442 for a while (almost like 438/439 for @leksyib), then the same unhandledENOENT
error stopped the process.Weirdly enough, after a little frustration and a few retries, the process went through to the
yarn install
part, and finally succeeded up to the “Happy hacking!” message.I am almost sure that the auth0-js dependency is not the culprit. It just happens to be a module that shows a warning just before the real error happens.
I do believe, though, that the error has to do with some sort of unhandled network fetch timeout, my current Internet connection being particularly bad, and the process finally going through after a few tries. It could be helpful it this was better handled by either create-react-native-app or yarn.
Hope this helps.
Same problems here as others have decribed
node LTS 8.11.1 (via n) macOS High Sierra create-react-native-app version: 1.0.0 yarn version: 1.5.1