I tested with a simple app generated by
npx create-react-app myfirstreact
It works fine with
npm start
but if I try to run it in the background with
nohup npm start &
I get
Starting the development server...
events.js:174 throw er; // Unhandled 'error' event ^
Error: EBADF: bad file descriptor, read Emitted 'error' event at: at lazyFs.read (internal/fs/streams.js:165:12) at FSReqWrap.wrapper [as oncomplete] (fs.js:467:17) npm ERR! code ELIFECYCLE npm ERR! errno 1 npm ERR! myfirstreact@0.1.0 start:
react-scripts start
npm ERR! Exit status 1 npm ERR! npm ERR! Failed at the myfirstreact@0.1.0 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!
/home/jglickman/.npm/_logs/2020-10-06T04_43_39_480Z-debug.log