ошибка при запуске приложения реакции

Я работаю с React v15.6.1 и Yarn, и я попытался запустить приложение реагирования с терминала, но когда я выполняю команду "yarn start", выдает ошибку и не запускаю приложение.

Журнал: начало пряжи

Starting the development server...

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

Error: watch /home/navastud/atom-workspace/intervijs/public ENOSPC
at _errnoException (util.js:1022:11)
at FSWatcher.start (fs.js:1382:19)
at Object.fs.watch (fs.js:1408:11)
at createFsWatchInstance (/home/navastud/atom-workspace/intervijs/node_modules/webpack-dev-server/node_modules/chokidar/lib/nodefs-handler.js:37:15)
at setFsWatchListener (/home/navastud/atom-workspace/intervijs/node_modules/webpack-dev-server/node_modules/chokidar/lib/nodefs-handler.js:80:15)
at FSWatcher.NodeFsHandler._watchWithNodeFs (/home/navastud/atom-workspace/intervijs/node_modules/webpack-dev-server/node_modules/chokidar/lib/nodefs-handler.js:228:14)
at FSWatcher.NodeFsHandler._handleDir (/home/navastud/atom-workspace/intervijs/node_modules/webpack-dev-server/node_modules/chokidar/lib/nodefs-handler.js:407:19)
at FSWatcher.<anonymous> (/home/navastud/atom-workspace/intervijs/node_modules/webpack-dev-server/node_modules/chokidar/lib/nodefs-handler.js:455:19)
at FSWatcher.<anonymous> (/home/navastud/atom-workspace/intervijs/node_modules/webpack-dev-server/node_modules/chokidar/lib/nodefs-handler.js:460:16)
at FSReqWrap.oncomplete (fs.js:153:5)
error Command failed with exit code 1.
info Visit https://yarnpkg.com/en/docs/cli/run for documentation about this command.

поэтому я попытался выполнить команду npm install, но не указал другие ошибки.

Журнал: установка npm

[email protected] /home/navastud/atom-workspace/intervijs
├─┬ [email protected]
│ ├── [email protected] 
│ ├─┬ [email protected]
│ │ └─┬ [email protected]
│ │   └─┬ [email protected] 
│ │     └── [email protected] 
│ ├─┬ [email protected] 
│ │ └── [email protected]  
│ ├─┬ [email protected] 
│ │ └── [email protected] 
│ └─┬ [email protected]
│   ├── UNMET PEER DEPENDENCY [email protected]
│   └── [email protected] 
├─┬ [email protected]
│ ├─┬ [email protected]
│ │ └─┬ @babel/[email protected]
│ │   └─┬ @babel/[email protected]
│ │     └── [email protected] 
│ ├─┬ UNMET PEER DEPENDENCY [email protected]
│ │ ├── [email protected] 
│ │ ├─┬ [email protected] 
│ │ │ └─┬ [email protected] 
│ │ │   └── [email protected] 
│ │ ├── [email protected] 
│ │ ├─┬ [email protected]
│ │ │ ├── [email protected] 
│ │ │ └─┬ [email protected] 
│ │ │   └── [email protected] 
│ │ ├─┬ [email protected] 
│ │ │ └── [email protected] 
│ │ └─┬ [email protected] 
│ │   └── [email protected] 
│ └─┬ [email protected]
│   └─┬ [email protected]
│     ├─┬ [email protected] 
│     │ └─┬ [email protected] 
│     │   └── [email protected] 
│     ├── [email protected] 
│     └─┬ [email protected]
│       └─┬ [email protected]
│         └─┬ [email protected] 
│           └── [email protected] 
├── UNMET PEER DEPENDENCY [email protected]
├── UNMET PEER DEPENDENCY [email protected]
└─┬ [email protected]
├─┬ [email protected]
│ └─┬ [email protected]
│   └── [email protected] 
├─┬ UNMET PEER DEPENDENCY [email protected]
│ ├── [email protected] 
│ ├── [email protected] 
│ ├─┬ [email protected] 
│ │ └─┬ [email protected] 
│ │   └── [email protected] 
│ ├── [email protected] 
│ ├─┬ [email protected] 
│ │ └── [email protected] 
│ └─┬ [email protected] 
│   └── [email protected] 
└─┬ [email protected]
  └─┬ [email protected]
    └─┬ [email protected]
      ├─┬ [email protected]
      │ └── [email protected] 
      └── [email protected] 

npm WARN optional Skipping failed optional dependency /react-scripts /fsevents:
npm WARN notsup Not compatible with your operating system or architecture: [email protected]
npm WARN optional Skipping failed optional dependency /chokidar/fsevents:
npm WARN notsup Not compatible with your operating system or architecture: [email protected]
npm WARN optional Skipping failed optional dependency /webpack-dev-server/chokidar/fsevents:
npm WARN notsup Not compatible with your operating system or architecture: [email protected]
npm WARN [email protected] requires a peer of ajv@^6.0.0 but none was installed.
npm WARN [email protected] requires a peer of eslint@^4.1.1 but none was installed.
npm WARN [email protected] requires a peer of eslint@>=1.6.0 <5.0.0 but none was installed.
npm WARN [email protected] requires a peer of [email protected] - 4.x  but none was installed.
npm WARN [email protected] requires a peer of eslint@^2.10.2 || ^3 || ^4 but none was installed.
npm WARN [email protected] requires a peer of eslint@^3.0.0 || ^4.0.0 but none was installed.
npm WARN [email protected] requires a peer of react@^0.14.7 || ^16.0.0 but none was installed.
npm WARN [email protected] requires a peer of react@^16.2.0 but none was installed.
npm WARN [email protected] requires a peer of react-dom@^16.2.0 but none was installed.

почему это происходит и как это решить?


person David Navarro Astudillo    schedule 01.08.2018    source источник
comment
Вы пробовали удалить все зависимости и установить все с нуля? rm -rf ./node_modules && npm install   -  person Tholle    schedule 01.08.2018
comment
спасибо, сработало правильно, но почему так происходит?   -  person David Navarro Astudillo    schedule 01.08.2018
comment
Большой! Это может произойти по разным причинам, сложно сказать, что могло пойти не так в данном конкретном случае.   -  person Tholle    schedule 01.08.2018
comment
Если переустановка node_modules сработала, скорее всего, это произошло из-за поврежденной библиотеки.   -  person ionizer    schedule 01.08.2018
comment
как я могу узнать, есть ли поврежденная библиотека, и починить ее ??   -  person David Navarro Astudillo    schedule 01.08.2018


Ответы (2)


Трудно точно сказать, почему вы получили эту ошибку, но если вы удалите каталог node_modules и переустановите все зависимости, он должен работать должным образом.

rm -rf ./node_modules && npm install
person Tholle    schedule 01.08.2018

Можно использовать следующую команду:

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