Missing .js files in the html_qer-app-portal folder (.zip) when building with the same commands in github actions

In our angular CI/CD pipeline (Github actions), not all files are generated during build in the html_qer-app-portal folder (.zip):

html (folder)
38.js
41.js
48.js
51.js
91.js
193.js
221.js
310.js
357.js
366.js
522.js
727.js
728.js

Where do these files come from, and how can we include them in our .zip files to display the entire page?

Parents
  • I suppose you're on v9.3?

    The files you are referring to, are chunk files created by webpack during the optimizing stage, in order to support lazy loading ES modules (in this case the plugins).

    They are only generated if the plugin libraries have been compiled beforehand. Make sure that you use the production flag (npm run build:production qer-app-portal) in the pipeline. The underlying nx script takes care of all dependencies by itself.

    If you want to reproduce it locally:

    1. Remove the html folder from your repo
    2. Remove everything in "dist/" except "qbm" and "qer"
    3. Run "npm run build qer-app-portal" (← Note: Without the production flag)

    The 234, 345, 567, 678, ... files should be gone.

    Now try "npm run build:production qer-app-portal" (this will take longer). Now you should see them again.

Reply
  • I suppose you're on v9.3?

    The files you are referring to, are chunk files created by webpack during the optimizing stage, in order to support lazy loading ES modules (in this case the plugins).

    They are only generated if the plugin libraries have been compiled beforehand. Make sure that you use the production flag (npm run build:production qer-app-portal) in the pipeline. The underlying nx script takes care of all dependencies by itself.

    If you want to reproduce it locally:

    1. Remove the html folder from your repo
    2. Remove everything in "dist/" except "qbm" and "qer"
    3. Run "npm run build qer-app-portal" (← Note: Without the production flag)

    The 234, 345, 567, 678, ... files should be gone.

    Now try "npm run build:production qer-app-portal" (this will take longer). Now you should see them again.

Children
  • Thank you very much for the answer, that helps us a lot.

    We're currently on version 9.2.0.

    Unfortunately, we get a different error message (when we do it this way).

     

    npm error code ENOENT

    npm error syscall open

    npm error path /home/runner/_work/Webshop/Webshop/package.json

    npm error errno -2

    npm error enoent Could not read package.json: Error: ENOENT: no such file or directory, open '/home/runner/_work/Webshop/Webshop/package.json'

    npm error enoent This is related to npm not being able to find a file.

    npm error enoent

    npm error A complete log of this run can be found in: /home/runner/.npm/_logs/2025-10-17T09_46_51_869Z-debug-0.log

     

    various solutions like

    github.com/.../261 

    didn't help either

  • Prior to 9.3 the command to create a production build is different: "npm run build:app qer-app-portal".

    But this seems not to be your current problem, it would tell you "Missing script build:production"

    From the output you provided it looks like your runner is trying to execute the commands in the wrong directory. Make sure that you change directory to the location where the "package.json" is stored (per default it is "imxweb" directly under the repo's root).

    Maybe add a debug "ls" step before callin any scripts, to list the contents of your current location ''/home/runner/_work/Webshop/Webshop/' if you're unsure what's going on

  • Thank you!

    We just tried it, but unfortunately the files are still missing.

    These are our build commands (it runs without errors):

    npm init
    npm install -g @angular/cli --save
    npm install --save --prefix imxweb
    npm run build qbm --if-present --prefix imxweb
    npm run build qer --if-present --prefix imxweb
    npm run build aad --if-present --prefix imxweb
    npm run build aob --if-present --prefix imxweb
    npm run build apc --if-present --prefix imxweb
    npm run build cpl --if-present --prefix imxweb
    npm run build dpr --if-present --prefix imxweb
    npm run build hds --if-present --prefix imxweb
    npm run build olg --if-present --prefix imxweb
    npm run build pol --if-present --prefix imxweb
    npm run build rmb --if-present --prefix imxweb
    npm run build rms --if-present --prefix imxweb
    npm run build sac --if-present --prefix imxweb
    npm run build uci --if-present --prefix imxweb
    npm run build att --if-present --prefix imxweb
    npm run build tsb --if-present --prefix imxweb
    npm run build rps --if-present --prefix imxweb
    npm run build:app qer-app-portal --if-present --prefix imxweb

  • Thank you!

    We just tried it, but unfortunately the files are still missing.

    These are our build commands (it runs without errors):

    npm init
    npm install -g @angular/cli --save
    npm install --save --prefix imxweb
    npm run build qbm --if-present --prefix imxweb
    npm run build qer --if-present --prefix imxweb
    npm run build aad --if-present --prefix imxweb
    npm run build aob --if-present --prefix imxweb
    npm run build apc --if-present --prefix imxweb
    npm run build cpl --if-present --prefix imxweb
    npm run build dpr --if-present --prefix imxweb
    npm run build hds --if-present --prefix imxweb
    npm run build olg --if-present --prefix imxweb
    npm run build pol --if-present --prefix imxweb
    npm run build rmb --if-present --prefix imxweb
    npm run build rms --if-present --prefix imxweb
    npm run build sac --if-present --prefix imxweb
    npm run build uci --if-present --prefix imxweb
    npm run build att --if-present --prefix imxweb
    npm run build tsb --if-present --prefix imxweb
    npm run build rps --if-present --prefix imxweb
    npm run build:app qer-app-portal --if-present --prefix imxweb