expo / create-react-native-app

Create React Native apps that run on iOS, Android, and web
BSD 3-Clause "New" or "Revised" License
13.27k stars 1.35k forks source link

yarn start gives error #391

Closed mahdiG closed 7 years ago

mahdiG commented 7 years ago

Description

I installed CRNP using yarn global and then created a project. Then I tried to run the project using yarn start

Expected Behavior

yarn start should've started the project

Observed Behavior

yarn start gave an error

If there's an error message, please paste the full terminal output and error message in this code block:

paperman@paperland:~/code/nativeapp$ yarn start
yarn start v0.27.5
$ react-native-scripts start

/home/paperman/code/nativeapp/node_modules/react-native-scripts/build/util/packager.js:81
      const watcherDetails = spawn
                             ^
TypeError: Cannot read property 'toString' of null
    at Object.run (/home/paperman/code/nativeapp/node_modules/react-native-scripts/build/util/packager.js:81:30)
    at Object.<anonymous> (/home/paperman/code/nativeapp/node_modules/react-native-scripts/build/scripts/start.js:40:10)
    at Module._compile (module.js:570:32)
    at Object.Module._extensions..js (module.js:579:10)
    at Module.load (module.js:487:32)
    at tryModuleLoad (module.js:446:12)
    at Function.Module._load (module.js:438:3)
    at Module.runMain (module.js:604:10)
    at run (bootstrap_node.js:389:7)
    at startup (bootstrap_node.js:149:9)
error Command failed with exit code 1.

Environment

Please run these commands in the project folder and fill in their results:

Also specify:

  1. Operating system: Debian Testing
  2. Phone/emulator/simulator & version:
brentvatne commented 7 years ago

thanks for the report @mahdiG! can you run sysctl fs.inotify.max_user_watches in your terminal and let me know what the output is?

brentvatne commented 7 years ago

I pushed a new minor release, if you run create-react-native-app SomeAppName again, you shouldn't see this error. still curious about the result of the above, though.

mahdiG commented 7 years ago

fs.inotify.max_user_watches = 65536 And thanks, it's working now 👍 But it shows a warning about not being able to run sysctl fs.inotify.max_user_watches and that's because sysctl should be run as root.