Registry / devops / babel-preset-node6

babel-preset-node6

JSON →
library11.0.0jsnpmunverified

v11.0.0 — Babel preset that transpiles only the ES2015 features missing in Node 6.x (V8 v5.x, ~93% coverage). Unlike the full ES2015 preset, this complements native V8 support, resulting in faster builds and execution. The preset includes only two plugins: trailing function commas and CommonJS modules. Last updated in 2017; no newer releases for current Node versions.

npm install babel-preset-node6
INSTALL
IMPORT
SIG · BABEL-PRESET-NODE6
B
babel-preset-node6
devopsjavascriptv11.0.0
Install
Import
Disk
Pass rate
0/ 6
Env Coverage0 / 6
glibc
1822
musl
1822
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
musl
node 18226 runs
build_error
glibc
node 18226 runs
build_error
Code
Verified usage

Verified import paths — ran on the pinned version, not inferred.

preset (via config)
{"presets": ["node6"]}
{"presets": ["babel-preset-node6"]}
In .babelrc or babel config, you can just use the short name "node6" without the prefix.
preset (via Node API)
require("babel-core").transform("code", { presets: ["node6"] })
require("babel-preset-node6")
The preset is not directly required; it is passed as a string in the presets array.
preset (via CLI)
babel script.js --presets node6
babel script.js --presets babel-preset-node6
CLI presets also use short name.

Minimal .babelrc configuration to transpile only ES2015 features missing in Node 6.x.

{ "presets": ["node6"] }
Debug
Known issues
deprecatedNode 6.x reached End of Life in April 2019. This preset is not maintained and should not be used for new projects.
fix
Use a modern Babel preset like @babel/preset-env with target 'node 10' or higher.
affects: >=0.0.0
gotchaDoes not include full ES2015 coverage; only trailing commas and CommonJS modules are transpiled. Other missing features (e.g., Symbol, Proxy) are not polyfilled.
fix
Add babel-polyfill or @babel/polyfill for complete ES2015 support.
affects: >=0.0.0
breakingRequires Babel 6.x. Incompatible with Babel 7.x (now @babel/... packages).
fix
Use @babel/preset-env with Babel 7 instead.
affects: >=0.0.0
Errors
Common errors & fixes
Error: Couldn't find preset "babel-preset-node6" relative to directory
Preset not installed or incorrect name used in configuration.
fix
Run npm install babel-preset-node6 and use short name "node6" in presets array.
SyntaxError: Unexpected token import
Babel not configured to transpile ES modules.
fix
Ensure .babelrc includes "presets": ["node6"] and that babel-register or babel-cli is used.
Upgrade
Version history
11.0.0latest on npm
Audit
Dependencies
babel-coreoptionalBabel core required at runtime (peer dependency)
babel-registeroptionalRequired for on-the-fly transpilation
Agent activity
7 hits · last 30 days
node
6
Resources
babel-preset-node6 — npm install babel-preset-node6 · libregistry