2

I am totally new in React/nodjs world, but I am struggling with it for couple of days. I have installed node-v13.50.0-x64 Then I have run following commands:

npm install expo-cli --global

expo init myproject

Then navigate to [myproject] location, finally run myproject:

npm start

But the procees got broken every time and I got following error:

events.js:282

      throw er; // Unhandled 'error' event
      ^

Error: UNKNOWN: unknown error, watch
    at FSEvent.FSWatcher._handle.onchange (internal/fs/watchers.js:129:28)
Emitted 'error' event on NodeWatcher instance at:
    at NodeWatcher.checkedEmitError (J:\React\NetNinja\myproject\node_m
odules\sane\src\node_watcher.js:143:12)
    at FSWatcher.emit (events.js:305:20)
    at FSEvent.FSWatcher._handle.onchange (internal/fs/watchers.js:135:12) {
  errno: -4094,
  syscall: 'watch',
  code: 'UNKNOWN',
  filename: null
}

package.json

  "main": "node_modules/expo/AppEntry.js",
  "scripts": {
    "start": "expo start",
    "android": "expo start --android",
    "ios": "expo start --ios",
    "web": "expo start --web",
    "eject": "expo eject"
  },
  "dependencies": {
    "expo": "~36.0.0",
    "react": "~16.9.0",
    "react-dom": "~16.9.0",
    "react-native": "https://github.com/expo/react-native/archive/sdk-36.0.0.tar.gz",
    "react-native-web": "~0.11.7"
  },
  "devDependencies": {
    "babel-preset-expo": "~8.0.0",
    "@babel/core": "^7.0.0"
  },
  "private": true
}

I tried to install npm again and tried to downgrade to older node js but it is it still give same error.

Please help.

R.Almoued
  • 219
  • 6
  • 16

2 Answers2

3

Try this: remove node_modules folder: rm -rf node_modules/. Then type: npm install & npm update, after: npm start

  • Note the Windows path in that error log: `rm` is likely not going to do much =) That said, deleting the node_modules folder and clearing the npm cache (`npm cache clean --force`) is before rerunning `npm install` is usually a good idea. – Mike 'Pomax' Kamermans Mar 05 '21 at 21:13
0

It has to deal with Watchman. All you have to do is go into the project folder from the terminal and run:

brew update

brew reinstall watchman

This should clear up the issue.

NathanNovak
  • 105
  • 1
  • 4