create-react-native-app: missing script: start
Description
After completing these 4 steps
$ npm install -g create-react-native-app
$ create-react-native-app my-app
$ cd my-app/
$ npm start
I got this error:
npm start
npm ERR! Windows_NT 6.1.7601
npm ERR! argv "C:\\Program Files\\nodejs\\node.exe" "C:\\Program Files\\nodejs\\node_modules\\npm\\bin\\npm-cli.js" "start"
npm ERR! node v5.9.0
npm ERR! npm v3.7.3
npm ERR! missing script: start
When I open package.json I see only
{
"name": "my-project",
"version": "0.1.0",
"private": true,
"devDependencies": {
"react-native-scripts": "0.0.40"
}
}
About this issue
- Original URL
- State: closed
- Created 7 years ago
- Comments: 31 (2 by maintainers)
why is downgrading to 4.6.1 the correct solution?
@vantuan02t1 use npm version 4.6.1 and reinstall creacte-react-native-app and remove AwesomeProject and create again npm install npm@4.6.1
I love react-native because it always need to do some tricks to do normal things. I have to use latest version of npm 5, so I have to give up react-native.
Something must be wrong with that version of npm, I’d recommend 4.6.1 or yarn. Notice that the only dependency that is installed is react-native-scripts, it should be installing react-native, expo, and a few more.
node -v 8.9.4 npm -v 5.6.0
same issue. My “issue” is that it doesn’t work with the latest version of npm.
Downgrading npm is not an option.
Encountered this as well using MacOS Sierra
Instructions
same issue : npm version: 5.4.2 node version :6.11.3
Yup, re-installing creacte-react-native-app did the trick!
John Laine 602.741.0261
On Oct 7, 2017 6:06 AM, “stoufa06” notifications@github.com wrote:
@johnlaine1 you need to have nodejs version >=6 and npm version 4 After that you need to reinstall create-react-native-app and delete my-app folder and create project again that’s it
Used yarn here, that worked for me.