bug: Can’t resolve ‘@babel/runtime/helpers/esm/extends [7.13.0 to 7.13.5]

Bug Report

Current behavior

When the Run server step runs in this GitHub Actions Build, this error is given:

ModuleNotFoundError: Module not found: Error: Can't resolve '@babel/runtime/helpers/esm/extends'

This currently happens with @babel/runtime from 7.13.0 to 7.13.5.

Current Fix
I was able to resolve this by install @babel/runtimeas a devDependency and forcing it to stay at7.12.18`. This can be seen in this GitHub Actions Build

Environment

  System:
    OS: macOS 10.15.7
  Binaries:
    Node: 12.20.1 - ~/.nvm/versions/node/v12.20.1/bin/node
    npm: 6.14.10 - ~/.nvm/versions/node/v12.20.1/bin/npm
  npmPackages:
    @babel/register: ^7.10.4 => 7.12.13 
    babel-eslint: ^10.0.1 => 10.1.0 
    babel-jest: ^25.1.0 => 25.5.1 
    babel-plugin-module-resolver: ^4.0.0 => 4.1.0 
    eslint: ^6.8.0 => 6.8.0 
    eslint-import-resolver-babel-module: ^5.1.2 => 5.2.0 
    jest: ^26.1.0 => 26.6.3 
    webpack: ^4.32.0 => 4.46.0 

Additional context
I’m not sure but I think this may be related to #12880.

2 thoughts on “bug: Can’t resolve ‘@babel/runtime/helpers/esm/extends [7.13.0 to 7.13.5]

  1. resolved.

    why is it loading that file as base64 : url-loader. It build-in roadhog.

    solution:
    add webpack.config.js as

    module.exports = config => {
      config.module.rules.forEach(item => {
        if (item.loader && item.loader.indexOf('url-loader') > -1) {
          item.exclude.push(/\.mjs$/);
        }
      });
      return config;
    };

    thanks