Running 'npm start' gives 'TypeError: runner.metro.getBundler(...).getBundler(...).getWatcher is not a function'

509 Views Asked by At

When I run 'npm start' in my command prompt, I get this error:

Validation Warning:

  Unknown option "watcher" with value {"additionalExts": ["env.development.local", "env.local", "env.development", "env"]} was found.
  This is probably a typing mistake. Fixing it will remove this message.
Starting Metro Bundler
TypeError: runner.metro.getBundler(...).getBundler(...).getWatcher is not a function
TypeError: runner.metro.getBundler(...).getBundler(...).getWatcher is not a function
    at Object.observeFileChanges (C:\Users\USER\Desktop\Numify\node_modules\@expo\cli\build\src\start\server\metro\waitForMetroToObserveTypeScriptFile.js:44:60)
    at MetroBundlerDevServer.watchEnvironmentVariables (C:\Users\USER\Desktop\Numify\node_modules\@expo\cli\build\src\start\server\metro\MetroBundlerDevServer.js:209:51)
    at DevServerManager.watchEnvironmentVariables (C:\Users\USER\Desktop\Numify\node_modules\@expo\cli\build\src\start\server\DevServerManager.js:193:35)
    at startAsync (C:\Users\USER\Desktop\Numify\node_modules\@expo\cli\build\src\start\startAsync.js:127:32)

I've tried uninstalling my metro modules and installing them again. But it doesn't work.

1

There are 1 best solutions below

0
Ethan Conner On

I ran into this issue after running npm audit fix --force and npm had reverted my react-native dependency to a previous version. Check to make sure you're using the latest versions of expo and react-native