npm не работает. create-реакции-native-приложение.

Версия npm 4.6.1 Также см. Ссылку на github.

Я создал нормальное приложение Hello World и попытался

create-react-native-app HelloWorldVatsal

он создал приложение, загрузил все модули и т. д. и дал сообщение об успехе на терминале

После этого сделал как ниже

cd HelloWorldVatsal
npm start

HelloWorldVatsal@0.1.0 start /home/mvix-vatsal/HelloWorldVatsal
react-native-scripts start

14:52:58: Unable to start server
  See https://git.io/v5vcn for more information, either install watchman or run the following snippet:
    sudo sysctl -w fs.inotify.max_user_instances=1024
    sudo sysctl -w fs.inotify.max_user_watches=12288
npm ERR! code ELIFECYCLE
npm ERR! errno 1
npm ERR! HelloWorldVatsal@0.1.0 start: `react-native-scripts start`
npm ERR! Exit status 1
npm ERR! 
npm ERR! Failed at the HelloWorldVatsal@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/mvix-vatsal/.npm/_logs/2018-02-19T09_22_58_504Z-debug.log

3 ответа

Как вы можете видеть из строк сообщений об ошибках, показанных ниже;

See https://git.io/v5vcn for more information, either install watchman or run the following snippet:
    sudo sysctl -w fs.inotify.max_user_instances=1024
    sudo sysctl -w fs.inotify.max_user_watches=12288

Вам необходимо установить watchman или запустите фрагменты, показанные в сообщении об ошибке.

Просто установка watchman работал на меня:D

моя система (mac) -> OSX 10.12.3

brew update

brew install watchman

Выполнение следующего работало для меня на Mac:

sudo sysctl -w kern.maxfiles = 5242880

sudo sysctl -w kern.maxfilesperproc = 524288

Другие вопросы по тегам