Create-react-app: Error after npm start

Created on 27 Feb 2020  路  19Comments  路  Source: facebook/create-react-app

After doing npx create-react-app my-app, it gives me an error when starting the server on my macBook. However, it's working perfectly fine on my pc.

npm ERR! code ELIFECYCLE
npm ERR! errno 1
npm ERR! [email protected] start: react-scripts start
npm ERR! Exit status 1
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.

stale

Most helpful comment

Add .env with "SKIP_PREFLIGHT_CHECK=true" than npm start

Omg it really worked. Thanks a lot.

All 19 comments

Add .env with "SKIP_PREFLIGHT_CHECK=true" than npm start

problem solved @Aakashdeveloper

Add .env with "SKIP_PREFLIGHT_CHECK=true" than npm start

what does it actually do?

Add .env with "SKIP_PREFLIGHT_CHECK=true" than npm start

Omg it really worked. Thanks a lot.

@Amooryjubran can we close this issue now

hi where to add .env , can you please help

create .env file in the root of your folder.
inside it put

NODE_ENV=development
PORT=8626
# Set your database/API connection information here
API_KEY=**************************
API_URL=**************************

where to add this line in that "SKIP_PREFLIGHT_CHECK=true" @sankshitpandoh

in .env file

NODE_ENV=development
PORT=8626

Set your database/API connection information here

API_KEY=*******
API_URL=
*******
SKIP_PREFLIGHT_CHECK=true

like these right?

@k96white,
why we need DB connection for starting react app

@Aakashdeveloper I was just editing the file, just ignore those two lines, rest is right?

i think only Add .env with "SKIP_PREFLIGHT_CHECK=true" than npm start

It didn't solved my issue ,

Capture

I am able to run it now using an old version of react-scripts (the current version was 3.4.0)
npm install [email protected]
will it cause any problems in the future?

I am able to run it now using an old version of react-scripts (the current version was 3.4.0)
npm install [email protected]
will it cause any problems in the future?

There maybe some security vulnerabilities that may arose in future. but is should be fine as long as you are not using this for production.

i'm getting this error... please help.

D:Reactroutertabs>npm start

[email protected] start D:Reactroutertabs
react-scripts start

Starting the development server...

events.js:288
throw er; // Unhandled 'error' event
^

Error: spawn cmd ENOENT
 at Process.ChildProcess._handle.onexit (internal/child_process.js:267:19)
 at onErrorNT (internal/child_process.js:469:16)
 at processTicksAndRejections (internal/process/task_queues.js:84:21)
Emitted 'error' event on ChildProcess instance at:
 at Process.ChildProcess._handle.onexit (internal/child_process.js:273:12)
 at onErrorNT (internal/child_process.js:469:16)
 at processTicksAndRejections (internal/process/task_queues.js:84:21) {
errno: 'ENOENT',
code: 'ENOENT',
syscall: 'spawn cmd',
path: 'cmd',
spawnargs: [ '/s', '/c', 'start', '""', '/b', '"http://localhost:3000"' ]
}
npm ERR! code ELIFECYCLE
npm ERR! errno 1
npm ERR! [email protected] start: react-scripts start
npm ERR! Exit status 1
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! C:UsersArifAppDataRoamingnpm-cache_logs2020-03-17T09_34_39_313Z-debug.log

This issue has been automatically marked as stale because it has not had any recent activity. It will be closed in 5 days if no further activity occurs.

This issue has been automatically closed because it has not had any recent activity. If you have a question or comment, please open a new issue.

Was this page helpful?
0 / 5 - 0 ratings

Related issues

jnachtigall picture jnachtigall  路  3Comments

alleroux picture alleroux  路  3Comments

oltsa picture oltsa  路  3Comments

dualcnhq picture dualcnhq  路  3Comments

fson picture fson  路  3Comments