【问题标题】:METRO BUNDLER ERROR: Metro Has Encountered an error: Cannot read properties of undefined(reading 'transformfile')METRO BUNDLER ERROR: Metro has Encountered an error: Cannot read properties of undefined(reading 'transformfile')
【发布时间】:2023-03-14 01:21:01
【问题描述】:

不知道为什么会这样,Bundler.js上出现了问题,错误指向了这一行。

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);
    })();

添加我通过 nvm 安装节点可能很重要。

谢谢!

【问题讨论】:

    标签: node.js react-native node-modules bundler metro-bundler


    【解决方案1】:

    就我而言,它是通过使用较低节点版本来解决的。试试nvm use 16.14.0(16.14.0是最新的lts版本)

    【讨论】:

    • 没有为我解决...
    • 也没有为我解决
    猜你喜欢
    • 2021-12-22
    • 2023-02-05
    • 1970-01-01
    • 2021-11-10
    • 2021-11-03
    • 2021-11-08
    • 2022-08-19
    • 2022-01-17
    • 2021-12-31
    相关资源
    最近更新 更多