Tower of Babel

raw JSON →
1.0.0 verified Sat Apr 25 auth: no javascript deprecated

A Node.js workshopper tutorial that teaches ES6 features through interactive exercises. Version 1.0.0 (last release circa 2015) is stable and uses Babel 6 with the es2015 preset. It is designed for offline command-line learning, with each exercise requiring the user to write code that passes a test. Differentiators: focuses exclusively on ES6 transpilation with Babel, as opposed to general ES6 tutorials. No longer actively maintained; superseded by modern environments with native ES6 support.

error Error: Cannot find module 'babel-preset-es2015'
cause The required babel-preset-es2015 is not installed.
fix
Run 'npm install babel-preset-es2015' inside the project directory.
error sh: ./node_modules/.bin/tower-of-babel: No such file or directory
cause The tower-of-babel package is not installed or the path is incorrect.
fix
Ensure tower-of-babel is in node_modules: run 'npm install tower-of-babel' from the project root.
error Error: Module version mismatch. Expected 50, got 48.
cause Babel is not compatible with the installed Node.js version.
fix
Use Node.js version 4.x or upgrade to Babel 7 with a compatible Node version.
deprecated Tower of Babel uses Babel 6 and is no longer maintained. Modern environments support ES6 natively.
fix Consider using native ES6 or a modern tutorial.
getting error Requires Node.js version 4 or lower. May fail on newer Node versions due to changes in module resolution.
fix Use an older Node.js version (e.g., 4.x) or Docker to run the tutorial.
gotcha The .babelrc file must have presets set to es2015 for Babel 6. Babel 7 uses @babel/preset-env.
fix For Babel 7, install @babel/cli, @babel/preset-env and set { "presets": ["@babel/preset-env"] } in .babelrc.
npm install tower-of-babel
yarn add tower-of-babel
pnpm add tower-of-babel

Sets up a new project with ESLint, Babel, and starts the Tower of Babel tutorial.

mkdir tower-of-babel-solutions && cd tower-of-babel-solutions && npm init -y && npm i tower-of-babel && npm i babel-cli babel-preset-es2015 && echo '{ "presets": ["es2015"] }' > .babelrc && ./node_modules/tower-of-babel/tower-of-babel.js