Ember.js Legacy Build Pipeline
Emberjs-build was an early, foundational build pipeline for Ember.js applications, primarily used before the widespread adoption of Ember CLI. It leveraged `Brocfile.js` and the Broccoli build system to compile and optimize Ember applications. This package (version 0.20.1) represents a period of Ember's build tooling evolution that has since been largely superseded. Modern Ember applications universally utilize Ember CLI, which provides a comprehensive command-line interface, project structure, and build orchestration, now increasingly integrating with Vite as its underlying build system for improved performance and developer experience. Ember.js itself follows a 6-week release cycle, with the current stable version being 6.11.0, and has made significant advancements in its build tooling far beyond what emberjs-build offered. Consequently, `emberjs-build` is no longer maintained and is not suitable for contemporary Ember development.
Common errors
-
Build failed. { "status": 3, "message": "..."cause This generic error often indicates a fundamental incompatibility or misconfiguration in the old Broccoli pipeline, frequently related to Node.js versions, missing dependencies, or syntax errors not handled by the older transpilers.fixVerify Node.js version compatibility for the specific `emberjs-build` version. Check `Brocfile.js` and `package.json` for syntax errors or missing Broccoli plugins. This error often necessitates a deeper dive into the Broccoli build graph. -
Error: Cannot find module 'emberjs-build'
cause The package is not installed or `require()` path is incorrect. More commonly, it indicates an attempt to use this package in a context where it's not expected (e.g., a modern Ember CLI app).fixEnsure `emberjs-build` is listed in `package.json` and `npm install` has been run. If encountered in a modern Ember project, remove any references to `emberjs-build` and use `ember-cli-build.js` instead.
Warnings
- breaking The entire `emberjs-build` pipeline is functionally incompatible with modern Ember.js applications (Ember 2.x and later, especially Ember CLI-based apps). Attempting to use it will lead to fundamental build failures, module resolution errors, and an inability to process contemporary Ember features or addons.
- deprecated `emberjs-build` has been superseded by Ember CLI and its subsequent evolutions, including the move towards Vite as the default build system in Ember 6.8. The package itself has not seen updates since 2017.
- gotcha Projects using `emberjs-build` are likely tied to very old Node.js versions and JavaScript syntax (pre-ES2015). Compatibility with current Node.js runtimes and modern JavaScript features is severely limited or non-existent, requiring specific environments or extensive polyfilling.
- gotcha Performance of legacy build tools like `emberjs-build` (and early Ember CLI versions) can be significantly slower than modern alternatives. Issues like slow initial builds and rebuilds were common, particularly for larger applications.
Install
-
npm install emberjs-build -
yarn add emberjs-build -
pnpm add emberjs-build
Imports
- EmberBuild
import EmberBuild from 'emberjs-build';
const EmberBuild = require('emberjs-build');
Quickstart
// Brocfile.js
// Ensure your packages definition aligns with the Ember.js source structure of the era.
// Example: https://github.com/emberjs/ember.js/blob/master/lib/packages.js
var packages = require('./lib/packages');
var EmberBuild = require('emberjs-build');
var emberBuild = new EmberBuild({
packages: packages
});
module.exports = emberBuild.getDistTrees();