Ember build failing for old project (Broccoli Plugin)

I’m not familiar with ember but I have a relatively ancient ember project (built with ember-cli 2.5.1) that I’m trying to rebuild. I don’t need to make any changes and would prefer to not upgrade any components if possible, I simply want to rebuild the project as-is. However, an ember build is throwing the following error:

>> The Broccoli Plugin: [SourceMapConcat: Concat: Vendor /assets/vendor.js] failed with:
>> Error: ENOENT: no such file or directory, stat '/home/runner/work/WebUI/WebUI/WebUI/tmp/source_map_concat-input_base_path-U1gwYYJj.tmp/0/node_modules/node-uuid/uuid.js'
>>     at Object.statSync (fs.js:855:3)
>>     at Concat.keyForFile (/home/runner/work/WebUI/WebUI/WebUI/node_modules/broccoli-caching-writer/index.js:87:20)
>>     at Array.map (<anonymous>)
>>     at Concat.CachingWriter._conditionalBuild (/home/runner/work/WebUI/WebUI/WebUI/node_modules/broccoli-caching-writer/index.js:109:65)
>>     at /home/runner/work/WebUI/WebUI/WebUI/node_modules/broccoli-caching-writer/node_modules/broccoli-plugin/read_compat.js:61:34
>>     at tryCatch (/home/runner/work/WebUI/WebUI/WebUI/node_modules/rsvp/dist/rsvp.js:525:12)
>>     at invokeCallback (/home/runner/work/WebUI/WebUI/WebUI/node_modules/rsvp/dist/rsvp.js:538:13)
>>     at publish (/home/runner/work/WebUI/WebUI/WebUI/node_modules/rsvp/dist/rsvp.js:508:7)
>>     at flush (/home/runner/work/WebUI/WebUI/WebUI/node_modules/rsvp/dist/rsvp.js:2415:5)
>>     at process._tickCallback (internal/process/next_tick.js:61:11)
>> The broccoli plugin was instantiated at: 
>>     at Concat.Plugin (/home/runner/work/WebUI/WebUI/WebUI/node_modules/broccoli-caching-writer/node_modules/broccoli-plugin/index.js:10:31)
>>     at Concat.CachingWriter [as constructor] (/home/runner/work/WebUI/WebUI/WebUI/node_modules/broccoli-caching-writer/index.js:18:10)
>>     at new Concat (/home/runner/work/WebUI/WebUI/WebUI/node_modules/broccoli-concat/concat.js:32:17)
>>     at module.exports (/home/runner/work/WebUI/WebUI/WebUI/node_modules/broccoli-concat/index.js:26:10)
>>     at EmberApp.concatFiles (/home/runner/work/WebUI/WebUI/WebUI/node_modules/ember-cli/lib/broccoli/ember-app.js:346:10)
>>     at EmberApp.javascript (/home/runner/work/WebUI/WebUI/WebUI/node_modules/ember-cli/lib/broccoli/ember-app.js:1212:12)
>>     at EmberApp.toArray (/home/runner/work/WebUI/WebUI/WebUI/node_modules/ember-cli/lib/broccoli/ember-app.js:1564:10)
>>     at EmberApp.toTree (/home/runner/work/WebUI/WebUI/WebUI/node_modules/ember-cli/lib/broccoli/ember-app.js:1586:30)
>>     at module.exports (/home/runner/work/WebUI/WebUI/WebUI/ember-cli-build.js:40:16)
>>     at Class.setupBroccoliBuilder (/home/runner/work/WebUI/WebUI/WebUI/node_modules/ember-cli/lib/models/builder.js:55:19)
>> npm
>> npm
>> ERR! errno 1
>> npm
>> ERR! webui@2.0.77 build: `ember build`
>> npm ERR! Exit status 1
>> npm ERR! 
>> npm ERR! Failed at the webui@2.0.77 build script.
>> npm
>> ERR! This is probably not a problem with npm. There is likely additional logging output above.
>> npm ERR! A complete log of this run can be found in:
>> npm ERR!     /home/runner/.npm/_logs/2023-10-16T00_59_57_939Z-debug.log
>> Exited with code: 1.
Warning: Task "exec:dev" failed.a Use --force to continue.

I’m not sure how this broccoli plugin comes into play or if I can simply disable it.

I’ve tried to set the following in ember-cli-build.js without success, it still seems to be trying to process the file:

module.exports = function(defaults) {
    var app = new EmberApp(defaults, {
        sourcemaps: {
            enabled: false

Any guidance would be greatly appreciated. I’m well versed in Node.js but I’m starting from scratch with the ember ecosystem. The last time it successfully built was possibly September of 2020 via Node 6.9.2 and it has no package-lock.json grrr!

Thanks in advance! :pray:

1 Like

Without knowing the currently installed package versions, all I can suggest is the brute force “work backwards” approach, especially if you don’t want to make upgrades. Tighten up the dependency resolutions in your package.json file, try again.

You might have success comparing the result of creating a brand new ember 2.5 app with the app you are working with.

Thanks, I tried this without much success, eventually ran into a deeply nested dependency that used a git:// URL (which has been deprecated by github). What’s worse is that a single run of ember build takes several minutes so the “fiddle with versions” process and try again is really tedious. I’ve taken a hiatus from this but might get back to it after the new year.

If you know it has worked with node 6 in the past then I would advise using the same version of node for now. I personally use Windows with nvm so for me it would be

nvm install 6
nvm use 6

then install the 2.51 version of ember-cli globally using

npm install -g ember-cli@2.51

In theory the cli is backwards compatible but I have not found this to be the case so I would go with the same version globally as the project for now.

Delete any existing dist, tmp and node_modules folders with

Remove-Item -Recurse  dist tmp node_modules


rd /q /s dist tmp node_modules

Is there a yarn.lock file? If so then try:

yarn install --pure-lockfile


yarn install


npm install

before finally trying to build again

to try and recreate the original conditions and then look at your options for upgrading etc.