Could not find module `@babel/runtime/helpers/typeof/_index.mjs` imported from `@babel/runtime/helpers/esm/typeof`

Bug Report

  • I would like to work on a fix!

Current behavior
I created an app with ember using npm and ember-cli (“ember-cli”: “^2.18.2”). It was running very well from last 3 years. From last week facing issue while running the app.

Input Code
import _extends from @babel/runtime/helpers/esm/typeof;
results in this error:
Uncaught Error: Could not find module @babel/runtime/helpers/typeof/_index.mjs imported from @babel/runtime/helpers/esm/typeof

Calling any other modules available under /node_modules works fine.

Expected behavior
Need to be able to call @babel/runtime/…

Babel Configuration (babel.config.js, .babelrc, package.json#babel, cli command, .eslintrc)

  • Filename: package.json
{
  "name": "my-ember-ui",
  "version": "0.0.0",
  "private": true,
  "description": "Small description goes here",
  "license": "MIT",
  "author": "",
  "directories": {
    "doc": "doc",
    "test": "tests"
  },
  "repository": "",
  "scripts": {
    "build": "ember build",
    "start": "ember server",
    "test": "ember test"
  },
  "devDependencies": {
    "bootstrap": "^3.3.7",
    "broccoli-asset-rev": "^2.4.5",
    "broccoli-static-compiler": "^0.2.2",
    "ember-ajax": "^3.0.0",
    "ember-bootstrap": "^1.0.0",
    "ember-cli": "^2.18.2",
    "ember-cli-app-version": "^3.0.0",
    "ember-cli-babel": "^7.3.0-beta.1",
    "ember-cli-cors": "0.0.2",
    "ember-cli-dependency-checker": "^2.0.0",
    "ember-cli-eslint": "^4.0.0",
    "ember-cli-htmlbars": "^2.0.1",
    "ember-cli-htmlbars-inline-precompile": "^1.0.0",
    "ember-cli-inject-live-reload": "^1.4.1",
    "ember-cli-jstree": "^1.0.9",
    "ember-cli-notifications": "^4.3.3",
    "ember-cli-qunit": "^4.0.0",
    "ember-cli-shims": "^1.1.0",
    "ember-cli-uglify": "^1.2.0",
    "ember-concurrency": "^0.8.14",
    "ember-crumbly": "^1.0.7",
    "ember-data": "~2.15.0",
    "ember-export-application-global": "^2.0.0",
    "ember-file-upload": "^2.5.0",
    "ember-flatpickr": "^2.7.0",
    "ember-font-awesome": "4.0.0-rc.4",
    "ember-introjs": "2.4.0",
    "ember-light-table": "^1.12.2",
    "ember-load-initializers": "^1.0.0",
    "ember-models-table": "^2.0.0-beta.3",
    "ember-one-way-select": "^4.0.0",
    "ember-paper-stepper": "0.0.10",
    "ember-power-select": "^2.0.9",
    "ember-resolver": "^4.0.0",
    "ember-responsive": "^2.0.5",
    "ember-source": "~2.15.0",
    "ember-welcome-page": "^3.0.0",
    "loader.js": "^4.2.3"
  },
  "engines": {
    "node": "^4.5 || 6.* || >= 7.*"
  },
  "dependencies": {
    "@babel/runtime": "^7.9.0",
    "ember-cli-js-cookie": "^0.1.1",
    "ember-timepicker": "^0.3.0"
  }
}

Environment
Babel version(s): @babel/runtime 7.9.0
Node/npm version: Node v10.15.3
OS: Windows 10 Enterprise, 64 bit


Possible Solution

Additional context
Note: “@babel/runtime”: “^7.9.0” in dependencies added for testing if this can resolve the issue. But unable to fix.
@babel/runtime/helpers/esm/typeof.js and @babel/runtime/helpers/typeof/_index.mjs exists under node_modules

1 possible answer(s) on “Could not find module `@babel/runtime/helpers/typeof/_index.mjs` imported from `@babel/runtime/helpers/esm/typeof`

  1. Just a quick update, if I pin @babel/runtime to 7.12.18 it works successfully. Just about to head off for the weekend, but i’ll try to put together a small example for you when I’m back in the office on Monday 👍