Registry / http-networking / babel-preset-es2015-node5

babel-preset-es2015-node5

JSON →
library1.2.0jsnpmunverified

A Babel preset for Node.js 5 to add missing ES2015 features such as destructuring, rest/parameters, modules, sticky/unicode regex, function name improvements, and shorthand property fixes. Version 1.2.0 is the latest stable release. This preset is specifically intended for Node 5 and is now obsolete as Node 5 has reached end-of-life. It was designed to complement the natively supported ES2015 features in that engine. For modern Node, use @babel/preset-env instead.

npm install babel-preset-es2015-node5
INSTALL
IMPORT
SIG · BABEL-PRESET-ES201
B
babel-preset-es2015-node5
http-networkingjavascriptv1.2.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.

es2015-node5 (preset)
In .babelrc: { "presets": ["es2015-node5"] }
In .babelrc: { "presets": ["babel-preset-es2015-node5"] }
Babel 6 resolves preset names automatically; no need to include 'babel-preset-' prefix.
require('babel-core').transform
require('babel-core').transform('code', { presets: ['es2015-node5'] })
require('babel-core').transform('code', { presets: ['es2015-node5'] })
No common mistake, but ensure babel-core is version 6.x.
destructuring (plugin)
transform-es2015-destructuring is automatically included when using the preset.
Manually specifying individual plugins is unnecessary.
The preset bundles multiple transforms; avoid listing them separately.

Install the preset, add it to .babelrc, and compile ES2015 code for Node 5.

// Install: npm install --save-dev babel-preset-es2015-node5 // .babelrc { "presets": ["es2015-node5"] } // Then run: babel script.js --out-file compiled.js
Debug
Known issues
deprecatedNode.js 5 has reached end-of-life. This preset is no longer maintained.
fix
Upgrade to Node.js 12+ and use @babel/preset-env with targets: { node: 'current' }.
affects: >=1.0.0
gotchaThis preset only works with Babel 6.x, not Babel 7+.
fix
For Babel 7, use @babel/preset-env instead.
affects: >=1.0.0
gotchaThe preset does not include all ES2015 features; only specific missing ones for Node 5.
fix
If you need full ES2015 support, use babel-preset-es2015.
affects: >=1.0.0
gotchaThe package version (1.2.0) may not receive further updates.
fix
Pin to exact version or migrate to a modern preset.
affects: >=1.0.0
Errors
Common errors & fixes
Error: Couldn't find preset "es2015-node5" relative to directory
Preset not installed or incorrect preset name.
fix
Run 'npm install --save-dev babel-preset-es2015-node5' and ensure .babelrc uses 'es2015-node5' (without 'babel-preset-').
Error: Plugin 0 specified in "base" provided an invalid property of type "undefined"
Using this preset with Babel 7 which expects different plugin format.
fix
Upgrade to @babel/preset-env and adjust configuration for Babel 7.
Upgrade
Version history
1.2.0latest on npm
Audit
Dependencies
babel-corerequiredThis preset is designed for Babel 6.x and requires babel-core to be installed.
Agent activity
12 hits · last 30 days
node
10
OpenAI (training)
1
Resources
babel-preset-es2015-node5 — npm install babel-preset-es2015-node5 · libregistry