'Metro Has Encountered an error: Cannot read properties of undefined(reading 'transformfile'). ERROR
Not sure Why I am getting this issue. I am following a react-native tutorial, and am experiencing this error:
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);
})();
Solution 1:[1]
This problem usually happens because the user is using a node version thats newer. You can solve this by downgrading your node using Nvm. Here is the Link to Using Nvm, https://www.npmjs.com/package/nvm. Let me know if you have any further questions :)
Sources
This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.
Source: Stack Overflow
Solution | Source |
---|---|
Solution 1 | zpodavay |