Aurelia v1 build fails

Hi.

We have a project based on Aurelia 1 that has been running without a hitch for a very long time. Today, after changing two css files, I committed my changes to git (GitLab) and our TeamCity build server picked up the changes and started building the application. It failed. This is rather strange as the previous build (on June 12 this year) finished without a problem. Looking at today’s build log I find this entry

[15:05:12] :	 [Step 3/4] ========================================
[15:05:12] :	 [Step 3/4] BuildFrontend
[15:05:12] :	 [Step 3/4] ========================================
[15:05:14] :	 [Step 3/4] 
[15:05:14] :	 [Step 3/4] > nettweb@0.1.0 build
[15:05:14] :	 [Step 3/4] > au build --env prod
[15:05:14] :	 [Step 3/4] 
[15:05:14]W:	 [Step 3/4] node:internal/modules/cjs/loader:1137
[15:05:14]W:	 [Step 3/4]   throw err;
[15:05:14]W:	 [Step 3/4]   ^
[15:05:14]W:	 [Step 3/4] 
[15:05:14]W:	 [Step 3/4] Error: Cannot find module 'D:\TeamCity\BuildAgent1\work\7ef3dbd13e1a9760\NettWeb\node_modules\aurelia-cli\bin\aurelia-cli.js'
[15:05:14]W:	 [Step 3/4]     at Module._resolveFilename (node:internal/modules/cjs/loader:1134:15)
[15:05:14]W:	 [Step 3/4]     at Module._load (node:internal/modules/cjs/loader:975:27)
[15:05:14]W:	 [Step 3/4]     at Function.executeUserEntryPoint [as runMain] (node:internal/modules/run_main:128:12)
[15:05:14]W:	 [Step 3/4]     at node:internal/main/run_main_module:28:49 {
[15:05:14]W:	 [Step 3/4]   code: 'MODULE_NOT_FOUND',
[15:05:14]W:	 [Step 3/4]   requireStack: []
[15:05:14]W:	 [Step 3/4] }
[15:05:14]W:	 [Step 3/4] 
[15:05:14]W:	 [Step 3/4] Node.js v18.19.1
[15:05:14]W:	 [Step 3/4] An error occurred when executing task 'BuildFrontend'.

This baffles me because little has been done to the application since the latest successful build. The only thing that has changed is the Nodejs version together with the “corresponding” npm version. As things stand we’re not able to serve our end users as we can’t build our SPA.

Any pointers, help, advice, etc. on how to solve this is highly appreciated.

TIA

–norgie

The issue has been resolved. Just remember folks never to check in a commit that’s been marked as “can’t remember why”. It’s a recipe for “disaster”.

–norgie

2 Likes

But was it anything related to Aurelia?

The bin folder including the file aurelia-cli.js was missing. So I added the folder and the file and everything ran smoothly last week. Trying to execute au run today produces the following error:

Starting 'readProjectConfiguration'...
{
  uid: 2,
  name: 'readProjectConfiguration',
  branch: false,
  error: TypeError: processNextTick is not a function
      at resume (C:\dev\source\repos\nettweb\NettWeb\node_modules\readable-stream\lib\_stream_readable.js:704:5)
      at DestroyableTransform.Readable.resume (C:\dev\source\repos\nettweb\NettWeb\node_modules\readable-stream\lib\_stream_readable.js:696:5)
      at DestroyableTransform.Readable.on (C:\dev\source\repos\nettweb\NettWeb\node_modules\readable-stream\lib\_stream_readable.js:666:53)
      at DestroyableTransform.Readable.pipe (C:\dev\source\repos\nettweb\NettWeb\node_modules\readable-stream\lib\_stream_readable.js:537:7)
      at Object.src (C:\dev\source\repos\nettweb\NettWeb\node_modules\vinyl-fs\lib\src\index.js:47:8)
      at C:\dev\source\repos\nettweb\NettWeb\node_modules\aurelia-cli\lib\build\source-inclusion.js:68:11
      at new Promise (<anonymous>)
      at exports.SourceInclusion.addAllMatchingResources (C:\dev\source\repos\nettweb\NettWeb\node_modules\aurelia-cli\lib\build\source-inclusion.js:48:12)
      at C:\dev\source\repos\nettweb\NettWeb\node_modules\aurelia-cli\lib\build\dependency-inclusion.js:28:33
      at Array.forEach (<anonymous>),
  duration: [ 0, 164717400 ],
  time: 1730799091263
}
{
  uid: 1,
  name: '<series>',
  branch: true,
  error: TypeError: processNextTick is not a function
      at resume (C:\dev\source\repos\nettweb\NettWeb\node_modules\readable-stream\lib\_stream_readable.js:704:5)
      at DestroyableTransform.Readable.resume (C:\dev\source\repos\nettweb\NettWeb\node_modules\readable-stream\lib\_stream_readable.js:696:5)
      at DestroyableTransform.Readable.on (C:\dev\source\repos\nettweb\NettWeb\node_modules\readable-stream\lib\_stream_readable.js:666:53)
      at DestroyableTransform.Readable.pipe (C:\dev\source\repos\nettweb\NettWeb\node_modules\readable-stream\lib\_stream_readable.js:537:7)
      at Object.src (C:\dev\source\repos\nettweb\NettWeb\node_modules\vinyl-fs\lib\src\index.js:47:8)
      at C:\dev\source\repos\nettweb\NettWeb\node_modules\aurelia-cli\lib\build\source-inclusion.js:68:11
      at new Promise (<anonymous>)
      at exports.SourceInclusion.addAllMatchingResources (C:\dev\source\repos\nettweb\NettWeb\node_modules\aurelia-cli\lib\build\source-inclusion.js:48:12)
      at C:\dev\source\repos\nettweb\NettWeb\node_modules\aurelia-cli\lib\build\dependency-inclusion.js:28:33
      at Array.forEach (<anonymous>),
  duration: [ 0, 168833900 ],
  time: 1730799091267
}
{
  uid: 0,
  name: '<series>',
  branch: true,
  error: TypeError: processNextTick is not a function
      at resume (C:\dev\source\repos\nettweb\NettWeb\node_modules\readable-stream\lib\_stream_readable.js:704:5)
      at DestroyableTransform.Readable.resume (C:\dev\source\repos\nettweb\NettWeb\node_modules\readable-stream\lib\_stream_readable.js:696:5)
      at DestroyableTransform.Readable.on (C:\dev\source\repos\nettweb\NettWeb\node_modules\readable-stream\lib\_stream_readable.js:666:53)
      at DestroyableTransform.Readable.pipe (C:\dev\source\repos\nettweb\NettWeb\node_modules\readable-stream\lib\_stream_readable.js:537:7)
      at Object.src (C:\dev\source\repos\nettweb\NettWeb\node_modules\vinyl-fs\lib\src\index.js:47:8)
      at C:\dev\source\repos\nettweb\NettWeb\node_modules\aurelia-cli\lib\build\source-inclusion.js:68:11
      at new Promise (<anonymous>)
      at exports.SourceInclusion.addAllMatchingResources (C:\dev\source\repos\nettweb\NettWeb\node_modules\aurelia-cli\lib\build\source-inclusion.js:48:12)
      at C:\dev\source\repos\nettweb\NettWeb\node_modules\aurelia-cli\lib\build\dependency-inclusion.js:28:33
      at Array.forEach (<anonymous>),
  duration: [ 0, 170352800 ],
  time: 1730799091268
}
TypeError: processNextTick is not a function
    at resume (C:\dev\source\repos\nettweb\NettWeb\node_modules\readable-stream\lib\_stream_readable.js:704:5)
    at DestroyableTransform.Readable.resume (C:\dev\source\repos\nettweb\NettWeb\node_modules\readable-stream\lib\_stream_readable.js:696:5)
    at DestroyableTransform.Readable.on (C:\dev\source\repos\nettweb\NettWeb\node_modules\readable-stream\lib\_stream_readable.js:666:53)
    at DestroyableTransform.Readable.pipe (C:\dev\source\repos\nettweb\NettWeb\node_modules\readable-stream\lib\_stream_readable.js:537:7)
    at Object.src (C:\dev\source\repos\nettweb\NettWeb\node_modules\vinyl-fs\lib\src\index.js:47:8)
    at C:\dev\source\repos\nettweb\NettWeb\node_modules\aurelia-cli\lib\build\source-inclusion.js:68:11
    at new Promise (<anonymous>)
    at exports.SourceInclusion.addAllMatchingResources (C:\dev\source\repos\nettweb\NettWeb\node_modules\aurelia-cli\lib\build\source-inclusion.js:48:12)
    at C:\dev\source\repos\nettweb\NettWeb\node_modules\aurelia-cli\lib\build\dependency-inclusion.js:28:33
    at Array.forEach (<anonymous>)

So I guess I’m stuck again.

I solved this by deleting the local repo and then cloning it.