METRO BUNDLER ERROR: Metro Has Encountered an error: Cannot read properties of undefined(reading 'transformfile')

Viewed 1609

I'm not sure why it is showing up like this, The problem occured on Bundler.js, and the error pointed to this line.

TransformFile(filePath, transformOptions) {
    var _this3 = this;

    return _asyncToGenerator(function*() {
      // We need to be sure that the DependencyGraph has been initialized.
      // TODO: Remove this ugly hack!
      yield _this3._depGraphPromise;
      return _this3._transformer.transformFile(filePath, transformOptions);
    })();

It might be important to add that I installed node via nvm.

Thank You!

1 Answers

In my case, it was solved by using lower node version. try nvm use 16.14.0 (16.14.0 is the latest lts version.)

Related