0

first of all I created a todo app in react.js with the command: npx create-react-app app_name

after running the command npm start, it displayed this errors to me:

enter image description here

enter image description here

after that I found a log file wich has all these lines that I didn't understand anything from them:

0 info it worked if it ends with ok 1 verbose cli [ 1 verbose cli '/home/amarmahdi/.nvm/versions/node/v14.17.0/bin/node', 1 verbose cli '/home/amarmahdi/.nvm/versions/node/v14.17.0/bin/npm', 1 verbose cli 'start' 1 verbose cli ] 2 info using npm@6.14.13 3 info using node@v14.17.0 4 verbose run-script [ 'prestart', 'start', 'poststart' ] 5 info lifecycle inventory@0.1.0~prestart: inventory@0.1.0 6 info lifecycle inventory@0.1.0~start: inventory@0.1.0 7 verbose lifecycle inventory@0.1.0~start: unsafe-perm in lifecycle true 8 verbose lifecycle inventory@0.1.0~start: PATH: /home/amarmahdi/.nvm/versions/node/v14.17.0/lib/node_modules/npm/node_modules/npm-lifecycle/node-gyp-bin:/home/amarmahdi/developement/reactTutorial/inventory/node_modules/.bin:/home/amarmahdi/.nvm/versions/node/v14.17.0/bin:/home/amarmahdi/.sdkman/candidates/java/current/bin:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/usr/games:/usr/local/games:/snap/bin 9 verbose lifecycle inventory@0.1.0~start: CWD: /home/amarmahdi/developement/reactTutorial/inventory 10 silly lifecycle inventory@0.1.0~start: Args: [ '-c', 'react-scripts start' ] 11 silly lifecycle inventory@0.1.0~start: Returned: code: 1 signal: null 12 info lifecycle inventory@0.1.0~start: Failed to exec start script 13 verbose stack Error: inventory@0.1.0 start: react-scripts start 13 verbose stack Exit status 1 13 verbose stack at EventEmitter. (/home/amarmahdi/.nvm/versions/node/v14.17.0/lib/node_modules/npm/node_modules/npm-lifecycle/index.js:332:16) 13 verbose stack at EventEmitter.emit (events.js:376:20) 13 verbose stack at ChildProcess. (/home/amarmahdi/.nvm/versions/node/v14.17.0/lib/node_modules/npm/node_modules/npm-lifecycle/lib/spawn.js:55:14) 13 verbose stack at ChildProcess.emit (events.js:376:20) 13 verbose stack at maybeClose (internal/child_process.js:1055:16) 13 verbose stack at Process.ChildProcess._handle.onexit (internal/child_process.js:288:5) 14 verbose pkgid inventory@0.1.0 15 verbose cwd /home/amarmahdi/developement/reactTutorial/inventory 16 verbose Linux 5.4.0-74-generic 17 verbose argv "/home/amarmahdi/.nvm/versions/node/v14.17.0/bin/node" "/home/amarmahdi/.nvm/versions/node/v14.17.0/bin/npm" "start" 18 verbose node v14.17.0 19 verbose npm v6.14.13 20 error code ELIFECYCLE 21 error errno 1 22 error inventory@0.1.0 start: react-scripts start 22 error Exit status 1 23 error Failed at the inventory@0.1.0 start script. 23 error This is probably not a problem with npm. There is likely additional logging output above. 24 verbose exit [ 1, true ]

for the operating system I'm using ubuntu 18.04 and for node I'm using node version manager, with node version 14.17.0.

I hope that there will be some answers about this question.

Amar Mahdi
  • 63
  • 1
  • 6
  • [This](https://stackoverflow.com/questions/53930305/nodemon-error-system-limit-for-number-of-file-watchers-reached) might help. – Charchit Kapoor Jun 27 '21 at 13:34

1 Answers1

1

This is because Linux internally observes the number of times file is watched.
Well, you can override the limit by doing

echo fs.inotify.max_user_watches=524288 | sudo tee -a /etc/sysctl.conf && sudo sysctl -p

in your terminal.

sid
  • 1,779
  • 8
  • 10
  • copy paste from https://stackoverflow.com/questions/53930305/nodemon-error-system-limit-for-number-of-file-watchers-reached – hakki Jun 27 '21 at 13:37