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.
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
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 ,
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
[90m at Process.ChildProcess._handle.onexit (internal/child_process.js:267:19)[39m
[90m at onErrorNT (internal/child_process.js:469:16)[39m
[90m at processTicksAndRejections (internal/process/task_queues.js:84:21)[39m
Emitted 'error' event on ChildProcess instance at:
[90m at Process.ChildProcess._handle.onexit (internal/child_process.js:273:12)[39m
[90m at onErrorNT (internal/child_process.js:469:16)[39m
[90m at processTicksAndRejections (internal/process/task_queues.js:84:21)[39m {
errno: [32m'ENOENT'[39m,
code: [32m'ENOENT'[39m,
syscall: [32m'spawn cmd'[39m,
path: [32m'cmd'[39m,
spawnargs: [ [32m'/s'[39m, [32m'/c'[39m, [32m'start'[39m, [32m'""'[39m, [32m'/b'[39m, [32m'"http://localhost:3000"'[39m ]
}
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.
Most helpful comment
Omg it really worked. Thanks a lot.