Install & Compatibility
Where this runs
tested against v? · npm install
Install × environment matrix
Each cell = how many times install + import succeeded across repeated harness runs. Partial = flaky.
glibc = Debian/Ubuntu slim · musl = Alpine Linux
muslnode 18–226 runs
build_error
glibcnode 18–226 runs
build_error
Code
Verified usage
Verified import paths — ran on the pinned version, not inferred.
babel-runtime
✓ require(['babel-runtime'], function(runtime) { ... })
✗ var runtime = require('babel-runtime');
AMD environment: use RequireJS async require, not CommonJS style.
core-js
✓ require(['core-js'], function(core) { ... })
✗ import 'core-js'
AMD module: use require or define, not ES6 import.
regenerator-runtime
✓ require(['regenerator-runtime'], function(generator) { ... })
✗ const regeneratorRuntime = require('regenerator-runtime');
AMD context: use array dependency in require.
babel-polyfill
✓ require(['babel-polyfill'])
✗ import 'babel-polyfill'
No return value; side-effect only. Must be loaded before your code.
Configure RequireJS paths and import a specific babel-runtime helper AMD module.
// 1. Install: npm install babel-runtime-amd --save-dev
// 2. In your RequireJS config, add paths:
requirejs.config({
paths: {
'babel-runtime': 'node_modules/babel-runtime-amd/babel-runtime',
'core-js': 'node_modules/babel-runtime-amd/core-js',
'regenerator-runtime': 'node_modules/babel-runtime-amd/regenerator-runtime'
}
});
// 3. Use in your module:
define(['babel-runtime/helpers/classCallCheck'], function(classCallCheck) {
function MyClass() {
classCallCheck(this, MyClass);
}
return MyClass;
});
Errors
Common errors & fixes
Module name 'babel-runtime' has not been loaded yet for context: use require([])
Using synchronous require instead of AMD async require.
fixUse require(['babel-runtime'], function(runtime) { ... }) instead of var runtime = require('babel-runtime'); Error: Mismatched anonymous define() module: function (...) { ... }
Multiple anonymous define calls, possibly from bundle and individual modules.
fixEnsure you either use the pre-built bundle OR individual modules, not both. If using bundle, exclude other babel-runtime paths.
ReferenceError: regeneratorRuntime is not defined
regenerator-runtime not loaded before using generators/async.
fixRequire ['regenerator-runtime'] before using generator functions, or use the bundle that includes it.
Audit
Dependencies
babel-runtimerequiredProvides the original babel-runtime helpers converted to AMD
core-jsrequiredIncluded as AMD module for polyfills
regenerator-runtimerequiredIncluded as AMD module for async/await support