Deprecated meta-package that redirects users to babel-core and babel-cli for actual Babel functionality
npx @tessl/cli install tessl/npm-babel@6.23.0The babel package v6.23.0 is a deprecated meta-package that serves as a migration guide and prevents accidental usage of the legacy babel entry point. It provides no functional API but instead directs users to the appropriate packages for their Babel needs: babel-core for Node.js API usage and babel-cli for command-line interface.
npm install babel (not recommended - see migration guidance)Instead of: babel package
Use: babel-core package
// DO NOT USE - this will throw an error
// const babel = require("babel");
// USE THIS INSTEAD
const babel = require("babel-core");Instead of: babel package
Use: babel-cli package
# Remove the deprecated package
npm uninstall babel
# Install the correct CLI package
npm install --save-dev babel-cliThe babel package contains only error-throwing stubs:
The main module entry point throws an error directing users to babel-core.
// index.js behavior - throws immediately
throw new Error("The node API for `babel` has been moved to `babel-core`.");The CLI script displays migration instructions and exits.
// src/cli.js behavior - prints error and exits with code 1
const globalMessage = path.dirname(process.execPath) === path.dirname(process.env._ || "") ? " -g" : "";
console.error("You have mistakenly installed the `babel` package, which is a no-op in Babel 6.\n" +
"Babel's CLI commands have been moved from the `babel` package to the `babel-cli` package.\n" +
"\n" +
" npm uninstall" + globalMessage + " babel\n" +
" npm install --save-dev babel-cli\n" +
"\n" +
"See http://babeljs.io/docs/usage/cli/ for setup instructions.");
process.exit(1);The package.json defines CLI binaries that reference non-existent files, intentionally breaking CLI usage:
{
"bin": {
"babel": "./lib/cli.js",
"babel-node": "./lib/cli.js",
"babel-external-helpers": "./lib/cli.js"
}
}Note: The ./lib/cli.js file does not exist, which prevents these binaries from functioning.
When requiring the babel package in Node.js:
Error: The node API for `babel` has been moved to `babel-core`.When attempting to use babel CLI commands:
You have mistakenly installed the `babel` package, which is a no-op in Babel 6.
Babel's CLI commands have been moved from the `babel` package to the `babel-cli` package.
npm uninstall babel
npm install --save-dev babel-cli
See http://babeljs.io/docs/usage/cli/ for setup instructions.For actual Babel functionality, use these packages instead:
This package exists because in Babel 6.x, the architecture was restructured to separate concerns:
babel package was split into focused packagesbabel-core provides the transformation enginebabel-cli provides command-line toolsThe stub babel package prevents breaking existing installations while guiding users to the correct packages.