Please make our job easier by filling this template out to completion. If you're requesting a feature instead of reporting a bug, please feel free to skip the Environment and Reproducible Demo sections.
I Tried with NPM (I had v5.5.1) and Yarn. After neither worked, I uninstalled yarn, npm, and node, and installed node@v6 and npm@v4. I only rolled back node, after only rolling back npm didn't work.
After installing create-react-native-app I create a basic app and run "npm start"
ran "npm start" Expected it to start the app
What actually happened when you performed the above actions?
I got an error and the app didn't start
If there's an error message, please paste the full terminal output and error message in this code block:
> [email protected] start /Users/admin/Data/App Design/2017/React Native Basics: Currency Converter App/CurrencyConverter
> react-native-scripts start
sh: react-native-scripts: command not found
npm ERR! file sh
npm ERR! code ELIFECYCLE
npm ERR! errno ENOENT
npm ERR! syscall spawn
npm ERR! [email protected] start: `react-native-scripts start`
npm ERR! spawn ENOENT
npm ERR!
npm ERR! Failed at the [email protected] start script.
npm ERR! This is probably not a problem with npm. There is likely additional logging output above.
npm ERR! A complete log of this run can be found in:
npm ERR! /Users/admin/.npm/_logs/2017-11-04T21_24_09_928Z-debug.log
Please run these commands in the project folder and fill in their results:
npm ls react-native-scripts: [email protected] npm ls react-native: [email protected]npm ls expo: [email protected]node -v: v6.11.5npm -v: 4.6.1yarn --version: -bash: yarn: command not found (I removed it for now)watchman version: "version": "3.9.0"Also specify:
Please provide a minimized reproducible demonstration of the problem you're reporting.
I'm not sure how to provide a demo for this case.
Issues that come with minimal repro's are resolved much more quickly than issues where a maintainer has to reproduce themselves.
Update:
I reinstalled yarn and tried creating a new app from my home directory. running "yarn start" from there actually worked.
trying to create an app in a different directory and running it with yarn failed though.
Here's the error:
yarn run v1.2.1
$ react-native-scripts start
/bin/sh: react-native-scripts: command not found
error Command failed with exit code 127.
info Visit https://yarnpkg.com/en/docs/cli/run for documentation about this command.
I all of sudden have the same issue without touching the repository. Very strange.
ok, it was an issue with yarn, not react-native-scripts.
I needed to reinstall yarn in order to solve the issue (yarn 1.3.2)
In my case I had an old copy of yarn which I had installed via npm, as well as a good copy installed via homebrew. My shell was using the old yarn which could not find the scripts. (You can check your yarn location with which yarn.)
The solution was to uninstall the copy of yarn that I had installed via npm:
npm uninstall -g yarn
And then my shell would use the good version of yarn instead.
This may happen when you've messed with the node_modules folder or dependencies directly. In my case, it was after ejecting and going back to master to an unejected version. Make sure you run yarn install before running yarn start again.
Most helpful comment
This may happen when you've messed with the
node_modulesfolder or dependencies directly. In my case, it was after ejecting and going back to master to an unejected version. Make sure you runyarn installbefore runningyarn startagain.