Create-react-native-app: missing script: start

Created on 10 Jul 2017  ·  31Comments  ·  Source: expo/create-react-native-app

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"
  }
}
awaiting-reply

Most helpful comment

why is downgrading to 4.6.1 the correct solution?

All 31 comments

what version of windows is "Windows_NT 6.1.7601"?

Windows 7

С уважением,
Андрей понедельник, 17 июля 2017г., 22:28 +03:00 от Brent Vatne [email protected] :

what version of windows is "Windows_NT 6.1.7601"?

You are receiving this because you authored the thread.
Reply to this email directly, view it on GitHub , or mute the thread .

Same issue here

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.

with these versions it works fine!

$ node -v
v7.3.0
$ npm -v
3.10.10

Can confirm @brentvatne.
Was using node version 8.2.1 and npm version 5.3.0 and got the same error.
Downgrading everything to node 6.11.1 and npm 4.6.1, which did fixed it.

Used yarn here, that worked for me.

After completing these steps

$ npm install -g create-react-native-app
$ create-react-native-app AwesomeProject
$ cd AwesomeProject
$ npm start

I got this error:

npm ERR! missing script: start

npm ERR! A complete log of this run can be found in:
npm ERR! /home/saravanan/.npm/_logs/2017-09-22T13_47_56_942Z-debug.log

npm ERR! missing script: start

this versions i have used

$ node -v
v8.4.0
$ npm -v
5.3.0

use npm 4.6.1

Using npm 4.6.1, got the same error

@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

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 https://github.com/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


You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub
https://github.com/react-community/create-react-native-app/issues/301#issuecomment-334933868,
or mute the thread
https://github.com/notifications/unsubscribe-auth/ABLWj8RDclQiXeQov2kL2mMlVIcnwNRPks5sp3c7gaJpZM4OTHPu
.

I have the same issue:
C:\Users\PC\AwesomeProject>npm start
npm ERR! missing script: start

npm ERR! A complete log of this run can be found in:
npm ERR! C:\Users\PC\AppData\Roaming\npm-cache_logs\2017-10-09T09_30_43_954Z-debug.log

Below as my version:
C:\Users\PC\AwesomeProject>node --version
v8.6.0

C:\Users\PC\AwesomeProject>npm --version
5.4.2

@vantuan02t1 use npm version 4.6.1 and reinstall creacte-react-native-app and remove AwesomeProject and create again
npm install [email protected]

If you are using firewall in linux try open port 19001

Thank you stoufa06, It works fine now

same issue :
npm version: 5.4.2
node version :6.11.3

@nizar2yas , please use npm version 4.6.1 and reinstall creacte-react-native-app and remove AwesomeProject and create again
npm install [email protected]

Yes you were right
here is the command to be executed for those who face the same issue :
npm i -g [email protected]

why is downgrading to 4.6.1 the correct solution?

I have this same issue and I don't know how to downgrade the NPM version.

npm ERR! missing script: start

npm ERR! A complete log of this run can be found in:
npm ERR!     /Users/rb/.npm/_logs/2017-11-07T16_06_56_332Z-debug.log

I am using the last versions of the node/npm

I am a Mac user and did not find the 4.6.1 version. By the way, I also would like to know why I need to downgrade to fix it. Thanks in advance.

npm install -g [email protected]

Thanks for the fast reply.

I tried to install it and I got a lot of "npm WARN checkPermissions" messages and some error messages:

npm ERR! path /usr/local/lib/node_modules/npm/node_modules/abbrev
npm ERR! code EACCES
npm ERR! errno -13
npm ERR! syscall access
npm ERR! Error: EACCES: permission denied, access '/usr/local/lib/node_modules/npm/node_modules/abbrev'
npm ERR!  { Error: EACCES: permission denied, access '/usr/local/lib/node_modules/npm/node_modules/abbrev'
npm ERR!   stack: 'Error: EACCES: permission denied, access \'/usr/local/lib/node_modules/npm/node_modules/abbrev\'',
npm ERR!   errno: -13,
npm ERR!   code: 'EACCES',
npm ERR!   syscall: 'access',
npm ERR!   path: '/usr/local/lib/node_modules/npm/node_modules/abbrev' }
npm ERR! 
npm ERR! Please try running this command again as root/Administrator.

npm ERR! A complete log of this run can be found in:
npm ERR!     /Users/renatobello/.npm/_logs/2017-11-07T16_52_59_581Z-debug.log

sudo npm install -g [email protected]

Thanks you @stoufa06

I installed the 4.6.1 version but I am still getting the same error:

 npm start
npm ERR! missing script: start

npm ERR! A complete log of this run can be found in:
npm ERR!     /Users/rb/.npm/_logs/2017-11-07T21_00_17_458Z-debug.log

Encountered this as well using MacOS Sierra

Instructions

# Install npm version 4
npm install -g npm@4

# This should now be @ 4.6 something
npm --version 

# Reinstall  create-react-native-app
npm install -g create-react-native-app

# Recreate project
create-react-native-app AwesomeProject
cd AwesomeProject
npm start

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.

These solutions are not working with Ubuntu 16.04

sudo ./npm install [email protected]
developer@1604:~/node-v8.9.4-linux-x64/bin$ npm -v
ERROR: npm is known not to run on Node.js v4.2.6
Node.js 4 is supported but the specific version you're running has
a bug known to break npm. Please update to at least 4.7.0 to use this
version of npm. You can find the latest release of Node.js at https://nodejs.org/

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.

please check package.json file. Inside you need to check script key:

"scripts": {
"start": "react-native-scripts start",
"eject": "react-native-scripts eject",
"android": "react-native-scripts android",
"ios": "react-native-scripts ios",
"test": "node ./node_modules/jest/bin/jest.js --watch"
},

if you don't see the previous code and only see "test" key. Then copy these lines and add

"devDependencies": {
"react-native-scripts": "1.11.1",
"jest-expo": "XXX",
"react-test-renderer": "16.2.0"
},

Help Me!

'.' is not recognized as an internal or external command,
operable program or batch file.
npm ERR! code ELIFECYCLE
npm ERR! errno 1
npm ERR! [email protected] dev: ./node_modules/serve/bin/serve.js
npm ERR! Exit status 1
npm ERR!
npm ERR! Failed at the [email protected] dev 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! C:\Users\Admin\AppData\Roaming\npm-cache_logs\2018-08-22T20_57_09_522Z-debug.log

How can I do?
what else i can?

Was this page helpful?
0 / 5 - 0 ratings