Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Modules processed by ngcc aren't working (v15) #50735

Closed
DzmVasileusky opened this issue Jun 15, 2023 · 8 comments
Closed

Modules processed by ngcc aren't working (v15) #50735

DzmVasileusky opened this issue Jun 15, 2023 · 8 comments
Labels
area: compiler Issues related to `ngc`, Angular's template compiler needs reproduction This issue needs a reproduction in order for the team to investigate further
Milestone

Comments

@DzmVasileusky
Copy link

Which @angular/* package(s) are the source of the bug?

Don't known / other

Is this a regression?

No

Description

We are experiencing a very complicated and strange bug.

What is the problem:
Old non-ivy angular modules aren’t working without triggering errors. Angular renders just empty structural directives and doesn't emit any errors.
Problems were spotted with:

@ngui/map
ng2-file-upload
@ngx-gallery/core

Important notes:

  1. It is working well in case scss loaders group is working slow and reproducable if it is working fast. Basically we uncovered it when reduced our scss loader build time by 50%.
  2. It magically started to work after some random build, then was broken again. So it is 99% compilation related. It seems View Engine modules are compiled in a wrong way from time to time.
    It may be angular/compiler, webpack, nx, ngcc related.

I've tried to create a minimal reproduction but it was working on a smaller app with exactly same architecture.
So this issue is looking like a race condition. It seems like scss loaders delayed other loaders but now it isn't doing it causing this issue.
Maybe something ngcc --create-ivy-entry-points related.

If there are any suggestions or similar issues have been seen it would be great. At least answer on a question: "how and why View Engine angular libraries may stop working silently on Angular 15?" will help a lot

Please provide a link to a minimal reproduction of the bug

No response

Please provide the exception or error you saw

No exceptions

Please provide the environment you discovered this bug in (run ng version)

Angular CLI: 15.2.0
Node: 18.13.0
Package Manager: pnpm 8.5.1
OS: darwin x64

Angular: 15.2.7
... animations, cdk, common, compiler, compiler-cli, core
... elements, forms, google-maps, language-service, localize
... material, platform-browser, platform-browser-dynamic
... platform-server, router

Package                         Version
---------------------------------------------------------
@angular-devkit/architect       0.1502.0
@angular-devkit/build-angular   15.2.6
@angular-devkit/core            15.1.0
@angular-devkit/schematics      15.1.0
@angular/cli                    15.2.0
@nguniversal/builders           15.2.1
@nguniversal/express-engine     15.2.1
@schematics/angular             15.1.0
rxjs                            7.8.0
typescript                      4.9.5
webpack                         5.74.0

Anything else?

No response

@JoostK
Copy link
Member

JoostK commented Jun 15, 2023

I am afraid that without a reproduction or insight into your build pipeline we won't be able to assist here. Since ngcc is no longer present in Angular 16 and v15 is LTS we won't be able to make any changes to ngcc anymore.

@JoostK JoostK added needs reproduction This issue needs a reproduction in order for the team to investigate further area: compiler Issues related to `ngc`, Angular's template compiler labels Jun 15, 2023
@ngbot ngbot bot added this to the Backlog milestone Jun 15, 2023
@DzmVasileusky
Copy link
Author

DzmVasileusky commented Jun 16, 2023

@JoostK
I analysed good and bad builds and that's what I found out.
ngui-map component in a good build is looking like that (note that it has selector, inputs and outputs exported):

...
26634: (qt,X,a)=>{
    let rt = (()=>{
            class st {...}
            return st.\u0275fac = function(Mt) {
                return new (Mt || st)(t.Y36(S),t.Y36(t.SBq),t.Y36(T),t.Y36(L),t.Y36(F),t.Y36(u),t.Y36(t.R0b))
            }
                ,
                st.\u0275cmp = t.Xpm({
                    type: st,
                    selectors: [["ngui-map"]],
                    inputs: {
                        ...
                    },
                    outputs: {
                        ...
                    },
                    features: [t._Bn([F, S, L, T]), t.TTD],
                    ngContentSelectors: O,
                    decls: 2,
                    vars: 0,
                    consts: [[1, "google-map"]],
                    template: function(Mt, ee) {
                        1 & Mt && (t.F$t(),
                            t._UZ(0, "div", 0),
                            t.Hsn(1))
                    },
                    styles: ["\n    ngui-map {display: block; height: 300px;}\n    .google-map {width: 100%; height: 100%}\n  "],
                    encapsulation: 2
                }),
                st
        }
    )();
}
...

same component in the bad build (btw bad build is 2/3 lesser and some classes are just missing from it):

66757: (qt,tt,a)=>{
    "use strict";
    a.d(tt, {
        ...
        uP: ()=>U
    });
    class U {...} // same class as in the example above, the whole module doesn't have `ngui-map` string mentioned as well as the whole main.js
}

Maybe someone who have developed ngcc can take a look, because it is looking like ngcc skipped that module and it was compiled in a wrong way.

In our package.json we are running ngcc like this

"postinstall": "ngcc --create-ivy-entry-points",

So it is in postinstall

@JoostK
Copy link
Member

JoostK commented Jun 16, 2023

someone who have developed ngcc can take a look

That would be me.

The code you shared is from the final Webpack bundle. ngcc stores its output in the node_modules directory, where you can find each transformed module. The package.json files have been updated with new main fields to redirect module imports to the ngcc-processed; the bundler is then configured to prefer those main fields over the original ones, thereby using the ngcc files. At least that is the theory.

As said, without a reproduction or insight into your build pipeline we won't be able to diagnose this issue.

@DzmVasileusky
Copy link
Author

DzmVasileusky commented Jun 16, 2023

@JoostK
Your insights are actually very helpful. Understanding of core principles of ngcc is helping me in finding an issue.
I did a clean pnpm i with and without ngcc --create-ivy-entry-points and found out that results of legacy package are equal. So ngcc hasn't added anything to node_modules for me.
How does ngcc know which module to process and which not?

@DzmVasileusky
Copy link
Author

DzmVasileusky commented Jun 16, 2023

@JoostK My another guess is that maybe ngcc is working in parallel with build so sometimes build is started before it finishes

Our build process (I cut out not related stuff)

#Updating TeamCity parameters with values from package.json.
echo "##teamcity[setParameter name='node_version' value='${node_version}']"
echo "##teamcity[setParameter name='pnpm_version' value='${pnpm_version}']"

[18:41:16] :	 [Step 2/13] Starting: /opt/tc-agent/temp/agentTmp/custom_script864380091419838871
[18:41:16] :	 [Step 2/13] in directory: /opt/tc-agent/work/cd8f8b508d0cf69e
[18:41:18] :	 [Step 2/13] 
[18:41:18] :	 [Step 2/13] -------------------------
[18:41:18] :	 [Step 2/13] Installing node:
[18:41:18] :	 [Step 2/13] -------------------------
[18:41:18]W:	 [Step 2/13] v18.13.0 is already installed.
[18:41:20] :	 [Step 2/13] Now using node v18.13.0 (npm v9.6.4)
[18:41:20] :	 [Step 2/13] 
[18:41:20] :	 [Step 2/13] -------------------------
[18:41:20] :	 [Step 2/13] Installing pnpm:
[18:41:20] :	 [Step 2/13] -------------------------
[18:41:21] :	 [Step 2/13] 
[18:41:21] :	 [Step 2/13] changed 1 package in 565ms
[18:41:21] :	 [Step 2/13] 
[18:41:21] :	 [Step 2/13] 1 package is looking for funding
[18:41:21] :	 [Step 2/13]   run `npm fund` for details
[18:41:21] :	 [Step 2/13] 
[18:41:21] :	 [Step 2/13] -------------------------
[18:41:21] :	 [Step 2/13] The node version found in the package.json: 18.13.0
[18:41:21] :	 [Step 2/13] The node version that will be used: v18.13.0
[18:41:21] :	 [Step 2/13] -------------------------
[18:41:21] :	 [Step 2/13] 
[18:41:21] :	 [Step 2/13] -------------------------
[18:41:21] :	 [Step 2/13] The PNPM version found in the package.json: 8.5.1
[18:41:21] :	 [Step 2/13] The PNPM version that will be used: 8.5.1
[18:41:21] :	 [Step 2/13] -------------------------
[18:41:21]i:	 [Step 2/13] ##teamcity[setParameter name='node_version' value='18.13.0']
[18:41:21]i:	 [Step 2/13] ##teamcity[setParameter name='pnpm_version' value='8.5.1']
[18:41:21] :	 [Step 2/13] Process exited with code 0
[18:41:21] : Step 3/13: Check NX affected status (Command Line) (27s)
[18:41:21]i:	 [Step 3/13] Build step condition "NXAffectedCheck does not equal skip" is satisfied
[18:41:21]i:	 [Step 3/13] Content of /opt/tc-agent/temp/agentTmp/custom_script10662794610223561 file: 
#!/bin/bash

export NVM_DIR="$([ -z "${XDG_CONFIG_HOME-}" ] && printf %s "${HOME}/.nvm" || printf %s "${XDG_CONFIG_HOME}/nvm")"
[ -s "$NVM_DIR/nvm.sh" ] && \. "$NVM_DIR/nvm.sh" # This loads nvm

#Switching node and npm version to one which was found at previous step in the package.json file
nvm use 18.13.0
pnpm install

echo -e "\n\n-------- Changed files"
cat /opt/tc-agent/temp/buildTmp/changedFiles1588001384444618978.txt
echo -e "\n\n-------- 10 latest commits"
git log --oneline -n 10 --no-abbrev-commit
echo -e "\n\n-------- commits from this build"
Commits=($(cat /opt/tc-agent/temp/buildTmp/changedFiles1588001384444618978.txt | grep -oE '[^:]+$' | sort | uniq))
echo ${Commits[*]} | tr " " "\n"

AppName=lease-app
AppList="affected: $(./node_modules/nx/bin/nx.js  print-affected --type=app --select=projects --base=master~${#Commits[@]} --head=HEAD)"
echo -e "\nApps $AppList \n"
echo -e "Checking $AppName ..."
if [[ "$AppList" == *"$AppName"* ]]; then 
    echo -e "\t Need new build for app $AppName, the build is continued.\n"
    echo "##teamcity[setParameter name='NXAffectedStatus' value='true']"
else
    echo -e "\t There are no changes for the $AppName, the build is stopping.\n"
    echo "##teamcity[setParameter name='NXAffectedStatus' value='false']"
    exit 0
fi

[18:41:21] :	 [Step 3/13] Starting: /opt/tc-agent/temp/agentTmp/custom_script10662794610223561
[18:41:21] :	 [Step 3/13] in directory: /opt/tc-agent/work/cd8f8b508d0cf69e
[18:41:22] :	 [Step 3/13] Now using node v18.13.0 (npm v9.6.4)
[18:41:23] :	 [Step 3/13] Lockfile is up to date, resolution step is skipped
[18:41:23] :	 [Step 3/13] Progress: resolved 1, reused 0, downloaded 0, added 0
[18:41:23] :	 [Step 3/13] Packages: +2801
[18:41:23] :	 [Step 3/13] ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
[18:41:24] :	 [Step 3/13] Progress: resolved 2801, reused 0, downloaded 0, added 0
[18:41:25] :	 [Step 3/13] Packages are hard linked from the content-addressable store to the virtual store.
[18:41:25] :	 [Step 3/13]   Content-addressable store is at: /home/buildmaster/.local/share/pnpm/store/v3
[18:41:25] :	 [Step 3/13]   Virtual store is at:             node_modules/.pnpm
[18:41:25] :	 [Step 3/13] Progress: resolved 2801, reused 125, downloaded 1, added 131
[18:41:26] :	 [Step 3/13] Progress: resolved 2801, reused 350, downloaded 1, added 347
[18:41:27] :	 [Step 3/13] Progress: resolved 2801, reused 600, downloaded 1, added 606
[18:41:28] :	 [Step 3/13] Progress: resolved 2801, reused 946, downloaded 1, added 1091
[18:41:29] :	 [Step 3/13] Progress: resolved 2801, reused 1353, downloaded 2, added 1497
[18:41:30] :	 [Step 3/13] Progress: resolved 2801, reused 1840, downloaded 4, added 1989
[18:41:31] :	 [Step 3/13] Progress: resolved 2801, reused 2421, downloaded 5, added 2576
[18:41:32] :	 [Step 3/13] Progress: resolved 2801, reused 2622, downloaded 10, added 2786
[18:41:33] :	 [Step 3/13] Progress: resolved 2801, reused 2623, downloaded 10, added 2787
[18:41:34] :	 [Step 3/13] Progress: resolved 2801, reused 2636, downloaded 10, added 2801, done
[18:41:37] :	 [Step 3/13] 
[18:41:37] :	 [Step 3/13] dependencies:
[18:41:37] :	 [Step 3/13] + @angular-slider/ngx-slider 2.0.3
[18:41:37] :	 [Step 3/13] + @angular/animations 15.2.7
[18:41:37] :	 [Step 3/13] + @angular/cdk 15.2.7
[18:41:37] :	 [Step 3/13] + @angular/common 15.2.7
[18:41:37] :	 [Step 3/13] + @angular/compiler 15.2.7
[18:41:37] :	 [Step 3/13] + @angular/core 15.2.7
[18:41:37] :	 [Step 3/13] + @angular/elements 15.2.7
[18:41:37] :	 [Step 3/13] + @angular/forms 15.2.7
[18:41:37] :	 [Step 3/13] + @angular/google-maps 15.2.7
[18:41:37] :	 [Step 3/13] + @angular/localize 15.2.7
[18:41:37] :	 [Step 3/13] + @angular/material 15.2.7
[18:41:37] :	 [Step 3/13] + @angular/platform-browser 15.2.7
[18:41:37] :	 [Step 3/13] + @angular/platform-browser-dynamic 15.2.7
[18:41:37] :	 [Step 3/13] + @angular/router 15.2.7
[18:41:37] :	 [Step 3/13] + @builder.io/sdk 1.1.35
[18:41:37] :	 [Step 3/13] + @module-federation/node 0.10.1
[18:41:37] :	 [Step 3/13] + ag-charts-community 7.1.0
[18:41:37] :	 [Step 3/13] + body-parser 1.20.2
[18:41:37] :	 [Step 3/13] + cors 2.8.5
[18:41:37] :	 [Step 3/13] + mixpanel-browser 2.45.0
[18:41:37] :	 [Step 3/13] + rxjs 7.8.0
[18:41:37] :	 [Step 3/13] + zone.js 0.12.0
[18:41:37] :	 [Step 3/13] 
[18:41:37] :	 [Step 3/13] devDependencies:
[18:41:37] :	 [Step 3/13] + @4tw/cypress-drag-drop 2.2.3
[18:41:37] :	 [Step 3/13] + @ag-grid-community/angular 29.1.0
[18:41:37] :	 [Step 3/13] + @ag-grid-community/client-side-row-model 29.1.0
[18:41:37] :	 [Step 3/13] + @ag-grid-community/core 29.1.0
[18:41:37] :	 [Step 3/13] + @ag-grid-community/styles 29.1.0
[18:41:37] :	 [Step 3/13] + @angular-builders/custom-webpack 15.0.0
[18:41:37] :	 [Step 3/13] + @angular-devkit/build-angular 15.2.6
[18:41:37] :	 [Step 3/13] + @angular-devkit/core 15.1.0
[18:41:37] :	 [Step 3/13] + @angular-devkit/schematics 15.1.0
[18:41:37] :	 [Step 3/13] + @angular-eslint/eslint-plugin 16.0.1
[18:41:37] :	 [Step 3/13] + @angular-eslint/eslint-plugin-template 16.0.1
[18:41:37] :	 [Step 3/13] + @angular-eslint/template-parser 16.0.1
[18:41:37] :	 [Step 3/13] + @angular/cli 15.2.0
[18:41:37] :	 [Step 3/13] + @angular/compiler-cli 15.2.7
[18:41:37] :	 [Step 3/13] + @angular/language-service 15.2.7
[18:41:37] :	 [Step 3/13] + @angular/platform-server 15.2.7
[18:41:37] :	 [Step 3/13] + @babel/eslint-parser 7.18.2
[18:41:37] :	 [Step 3/13] + @builder.io/angular 2.2.1
[18:41:37] :	 [Step 3/13] + @cypress/grep 3.1.4
[18:41:37] :	 [Step 3/13] + @deck.gl/extensions 8.8.11
[18:41:37] :	 [Step 3/13] + @deck.gl/google-maps 8.8.11
[18:41:37] :	 [Step 3/13] + @deck.gl/layers 8.8.11
[18:41:37] :	 [Step 3/13] + @egjs/hammerjs 2.0.17
[18:41:37] :	 [Step 3/13] + @fingerprintjs/fingerprintjs-pro-angular 1.1.1
[18:41:37] :	 [Step 3/13] + @fortawesome/fontawesome-pro 5.15.4
[18:41:37] :	 [Step 3/13] + @googlemaps/js-api-loader 1.13.8
[18:41:37] :	 [Step 3/13] + @mdx-js/preact 1.6.22
[18:41:37] :	 [Step 3/13] + @mdx-js/react 1.6.22
[18:41:37] :	 [Step 3/13] + @microsoft/signalr 6.0.2
[18:41:37] :	 [Step 3/13] + @ng-select/ng-select 10.0.3
[18:41:37] :	 [Step 3/13] + @ngrx/component-store 15.3.0
[18:41:37] :	 [Step 3/13] + @ngrx/effects 15.3.0
[18:41:37] :	 [Step 3/13] + @ngrx/entity 15.3.0
[18:41:37] :	 [Step 3/13] + @ngrx/router-store 15.3.0
[18:41:37] :	 [Step 3/13] + @ngrx/schematics 15.3.0
[18:41:37] :	 [Step 3/13] + @ngrx/store 15.3.0
[18:41:37] :	 [Step 3/13] + @ngrx/store-devtools 15.3.0
[18:41:37] :	 [Step 3/13] + @ngui/map 0.30.3
[18:41:37] :	 [Step 3/13] + @nguniversal/builders 15.2.1
[18:41:37] :	 [Step 3/13] + @nguniversal/express-engine 15.2.1
[18:41:37] :	 [Step 3/13] + @ngx-gallery/core 4.0.3
[18:41:37] :	 [Step 3/13] + @ngx-share/core 7.1.4
[18:41:37] :	 [Step 3/13] + @nx/angular 16.1.4
[18:41:37] :	 [Step 3/13] + @nx/cypress 16.1.4
[18:41:37] :	 [Step 3/13] + @nx/devkit 16.1.4
[18:41:37] :	 [Step 3/13] + @nx/eslint-plugin 16.1.4
[18:41:37] :	 [Step 3/13] + @nx/jest 16.1.4
[18:41:37] :	 [Step 3/13] + @nx/js 16.1.4
[18:41:37] :	 [Step 3/13] + @nx/linter 16.1.4
[18:41:37] :	 [Step 3/13] + @nx/plugin 16.1.4
[18:41:37] :	 [Step 3/13] + @nx/storybook 16.1.4
[18:41:37] :	 [Step 3/13] + @nx/web 16.1.4
[18:41:37] :	 [Step 3/13] + @nx/workspace 16.1.4
[18:41:37] :	 [Step 3/13] + @phenomnomnominal/tsquery 5.0.1
[18:41:37] :	 [Step 3/13] + @relative-ci/agent 4.0.0
[18:41:37] :	 [Step 3/13] + @schematics/angular 15.1.0
[18:41:37] :	 [Step 3/13] + @sentry/angular-ivy 7.47.0
[18:41:37] :	 [Step 3/13] + @sentry/integrations 7.47.0
[18:41:37] :	 [Step 3/13] + @sentry/tracing 7.47.0
[18:41:37] :	 [Step 3/13] + @splitsoftware/splitio 10.15.9
[18:41:37] :	 [Step 3/13] + @storybook/addon-a11y 7.0.11
[18:41:37] :	 [Step 3/13] + @storybook/addon-docs 7.0.14
[18:41:37] :	 [Step 3/13] + @storybook/addon-essentials 7.0.11
[18:41:37] :	 [Step 3/13] + @storybook/addon-jest 7.0.11
[18:41:37] :	 [Step 3/13] + @storybook/addon-mdx-gfm 7.0.11
[18:41:37] :	 [Step 3/13] + @storybook/addons 7.0.11
[18:41:37] :	 [Step 3/13] + @storybook/angular 7.0.11
[18:41:37] :	 [Step 3/13] + @storybook/builder-webpack5 7.0.14
[18:41:37] :	 [Step 3/13] + @storybook/core-server 7.0.11
[18:41:37] :	 [Step 3/13] + @storybook/mdx1-csf 1.0.0
[18:41:37] :	 [Step 3/13] + @storybook/test-runner 0.10.0
[18:41:37] :	 [Step 3/13] + @storybook/theming 7.0.11
[18:41:37] :	 [Step 3/13] + @swc-node/register 1.4.2
[18:41:37] :	 [Step 3/13] + @swc/cli 0.1.62
[18:41:37] :	 [Step 3/13] + @swc/core 1.3.23
[18:41:37] :	 [Step 3/13] + @swc/helpers 0.5.1
[18:41:37] :	 [Step 3/13] + @swimlane/ngx-charts 17.0.1
[18:41:37] :	 [Step 3/13] + @swimlane/ngx-datatable 20.0.0
[18:41:37] :	 [Step 3/13] + @types/angular 1.7.0
[18:41:37] :	 [Step 3/13] + @types/angular-animate 1.5.10
[18:41:37] :	 [Step 3/13] + @types/angulartics 1.4.1
[18:41:37] :	 [Step 3/13] + @types/body-parser 1.19.2
[18:41:37] :	 [Step 3/13] + @types/compression 1.7.2
[18:41:37] :	 [Step 3/13] + @types/cookie-parser 1.4.3
[18:41:37] :	 [Step 3/13] + @types/css-mediaquery 0.1.1
[18:41:37] :	 [Step 3/13] + @types/d3 3.5.47
[18:41:37] :	 [Step 3/13] + @types/d3-scale 4.0.3
[18:41:37] :	 [Step 3/13] + @types/express 4.17.13
[18:41:37] :	 [Step 3/13] + @types/fs-extra 9.0.12
[18:41:37] :	 [Step 3/13] + @types/geojson 7946.0.10
[18:41:37] :	 [Step 3/13] + @types/google.maps 3.48.2
[18:41:37] :	 [Step 3/13] + @types/grecaptcha 3.0.4
[18:41:37] :	 [Step 3/13] + @types/hammerjs 2.0.36
[18:41:37] :	 [Step 3/13] + @types/jest 29.4.4
[18:41:37] :	 [Step 3/13] + @types/mdx 2.0.3
[18:41:37] :	 [Step 3/13] + @types/mixpanel-browser 2.38.1
[18:41:37] :	 [Step 3/13] + @types/ng-file-upload 12.2.2
[18:41:37] :	 [Step 3/13] + @types/node 18.13.0
[18:41:37] :	 [Step 3/13] + @types/node-dir 0.0.34
[18:41:37] :	 [Step 3/13] + @types/nvd3 1.8.42
[18:41:37] :	 [Step 3/13] + @types/smoothscroll-polyfill 0.3.0
[18:41:37] :	 [Step 3/13] + @types/string-similarity 3.0.0
[18:41:37] :	 [Step 3/13] + @types/stripe-v3 3.1.18
[18:41:37] :	 [Step 3/13] + @types/topojson-client 3.0.0
[18:41:37] :	 [Step 3/13] + @types/topojson-specification 1.0.2
[18:41:37] :	 [Step 3/13] + @types/vimeo__player 2.9.1
[18:41:37] :	 [Step 3/13] + @typescript-eslint/eslint-plugin 5.59.5
[18:41:37] :	 [Step 3/13] + @typescript-eslint/parser 5.59.5
[18:41:37] :	 [Step 3/13] + @vimeo/player 2.14.0
[18:41:37] :	 [Step 3/13] + @xmldom/xmldom 0.8.4
[18:41:37] :	 [Step 3/13] + ag-charts-angular 7.1.0
[18:41:37] :	 [Step 3/13] + angular-gridster2 15.0.4
[18:41:37] :	 [Step 3/13] + angulartics2 12.2.0
[18:41:37] :	 [Step 3/13] + animate-css-grid 1.4.3
[18:41:37] :	 [Step 3/13] + anysort 2.0.0
[18:41:37] :	 [Step 3/13] + apply-loader 2.0.0
[18:41:37] :	 [Step 3/13] + compression 1.7.4
[18:41:37] :	 [Step 3/13] + cookie-parser 1.4.5
[18:41:37] :	 [Step 3/13] + cross-env 7.0.3
[18:41:37] :	 [Step 3/13] + cy2 4.0.6
[18:41:37] :	 [Step 3/13] + cypress 12.12.0
[18:41:37] :	 [Step 3/13] + cypress-commands 3.0.0
[18:41:37] :	 [Step 3/13] + cypress-downloadfile 1.2.1
[18:41:37] :	 [Step 3/13] + cypress-file-upload 5.0.8
[18:41:37] :	 [Step 3/13] + cypress-iframe 1.0.1
[18:41:37] :	 [Step 3/13] + cypress-image-snapshot 4.0.1
[18:41:37] :	 [Step 3/13] + cypress-real-events 1.7.6
[18:41:37] :	 [Step 3/13] + cypress-recurse 1.27.0
[18:41:37] :	 [Step 3/13] + cypress-wait-until 1.7.1
[18:41:37] :	 [Step 3/13] + d3-scale 4.0.2
[18:41:37] :	 [Step 3/13] + dayjs 1.9.1
[18:41:37] :	 [Step 3/13] + deck.gl 8.8.11
[18:41:37] :	 [Step 3/13] + domino 2.1.6
[18:41:37] :	 [Step 3/13] + dotenv 10.0.0
[18:41:37] :	 [Step 3/13] + dpdm 3.8.0
[18:41:37] :	 [Step 3/13] + eslint 8.15.0
[18:41:37] :	 [Step 3/13] + eslint-config-crexi <- eslint 0.0.0
[18:41:37] :	 [Step 3/13] + eslint-config-google 0.14.0
[18:41:37] :	 [Step 3/13] + eslint-config-prettier 8.4.0
[18:41:37] :	 [Step 3/13] + eslint-plugin-crexi <- eslint 0.0.0
[18:41:37] :	 [Step 3/13] + eslint-plugin-cypress 2.12.1
[18:41:37] :	 [Step 3/13] + eslint-plugin-storybook 0.6.12
[18:41:37] :	 [Step 3/13] + express 4.18.2
[18:41:37] :	 [Step 3/13] + faker 5.5.3
[18:41:37] :	 [Step 3/13] + fontawesome-subset 3.0.0
[18:41:37] :	 [Step 3/13] + fs-extra 4.0.2
[18:41:37] :	 [Step 3/13] + geojson 0.5.0
[18:41:37] :	 [Step 3/13] + get-date 1.0.2
[18:41:37] :	 [Step 3/13] + googleapis 92.0.0
[18:41:37] :	 [Step 3/13] + html-loader 3.1.0
[18:41:37] :	 [Step 3/13] + html-webpack-plugin 5.5.0
[18:41:37] :	 [Step 3/13] + http-signature 1.3.5
[18:41:37] :	 [Step 3/13] + husky 7.0.4
[18:41:37] :	 [Step 3/13] + i18n-iso-countries 7.2.0
[18:41:37] :	 [Step 3/13] + jasmine-marbles 0.9.2
[18:41:37] :	 [Step 3/13] + jest 29.4.3
[18:41:37] :	 [Step 3/13] + jest-environment-jsdom 29.4.3
[18:41:37] :	 [Step 3/13] + jest-fetch-mock 3.0.3
[18:41:37] :	 [Step 3/13] + jest-location-mock 1.0.9
[18:41:37] :	 [Step 3/13] + jest-preset-angular 13.1.1
[18:41:37] :	 [Step 3/13] + jest-teamcity-reporter 0.9.0
[18:41:37] :	 [Step 3/13] + jsonc-eslint-parser 2.1.0
[18:41:37] :	 [Step 3/13] + libphonenumber-js 1.7.52
[18:41:37] :	 [Step 3/13] + lint-staged 12.3.5
[18:41:37] :	 [Step 3/13] + lodash 4.17.21
[18:41:37] :	 [Step 3/13] + ng-lazyload-image 9.1.3
[18:41:37] :	 [Step 3/13] + ng-mocks 14.7.3
[18:41:37] :	 [Step 3/13] + ng2-dragula 2.1.0
[18:41:37] :	 [Step 3/13] + ng2-file-upload 1.4.0
[18:41:37] :	 [Step 3/13] + ngx-clipboard 12.2.1
[18:41:37] :	 [Step 3/13] + ngx-color-picker 14.0.0
[18:41:37] :	 [Step 3/13] + ngx-editor 15.0.0
[18:41:37] :	 [Step 3/13] + ngx-ellipsis 4.1.1
[18:41:37] :	 [Step 3/13] + ngx-image-cropper 6.1.0
[18:41:37] :	 [Step 3/13] + node-dir 0.1.17
[18:41:37] :	 [Step 3/13] + node-fetch 3.3.1
[18:41:37] :	 [Step 3/13] + normalize.css 8.0.1
[18:41:37] :	 [Step 3/13] + nx 16.1.4
[18:41:37] :	 [Step 3/13] + nx-cloud 16.0.5
[18:41:37] :	 [Step 3/13] + pdf-parse 1.1.1
[18:41:37] :	 [Step 3/13] + postcss-scss 4.0.4
[18:41:37] :	 [Step 3/13] + prettier 2.7.1
[18:41:37] :	 [Step 3/13] + react 18.2.0
[18:41:37] :	 [Step 3/13] + react-dom 18.2.0
[18:41:37] :	 [Step 3/13] + read-excel-file 5.2.26
[18:41:37] :	 [Step 3/13] + recombee-js-api-client 3.0.1
[18:41:37] :	 [Step 3/13] + rimraf 3.0.0
[18:41:37] :	 [Step 3/13] + smoothscroll-polyfill 0.4.3
[18:41:37] :	 [Step 3/13] + storybook 7.0.11
[18:41:37] :	 [Step 3/13] + storybook-addon-designs 6.3.1
[18:41:37] :	 [Step 3/13] + string-similarity 4.0.1
[18:41:37] :	 [Step 3/13] + stylelint 15.7.0
[18:41:37] :	 [Step 3/13] + stylelint-config-recess-order 4.0.0
[18:41:37] :	 [Step 3/13] + stylelint-config-recommended-scss 12.0.0
[18:41:37] :	 [Step 3/13] + stylelint-order 6.0.3
[18:41:37] :	 [Step 3/13] + topojson-client 3.1.0
[18:41:37] :	 [Step 3/13] + ts-jest 29.1.0
[18:41:37] :	 [Step 3/13] + ts-morph 17.0.1
[18:41:37] :	 [Step 3/13] + ts-node 10.9.1
[18:41:37] :	 [Step 3/13] + tslib 2.3.0
[18:41:37] :	 [Step 3/13] + tsutils 3.17.1
[18:41:37] :	 [Step 3/13] + typescript 4.9.5
[18:41:37] :	 [Step 3/13] + typescript-parser 2.6.1
[18:41:37] :	 [Step 3/13] + webpack 5.74.0
[18:41:37] :	 [Step 3/13] + webpack-bundle-analyzer 4.5.0
[18:41:37] :	 [Step 3/13] + xmlhttprequest 1.8.0
[18:41:37] :	 [Step 3/13] + yargs 17.7.2
[18:41:37] :	 [Step 3/13] 
[18:41:37] :	 [Step 3/13] 
[18:41:37] :	 [Step 3/13] > crexi@15.2.0 postinstall /opt/tc-agent/work/cd8f8b508d0cf69e
[18:41:37] :	 [Step 3/13] > ngcc --create-ivy-entry-points
[18:41:37] :	 [Step 3/13] 
[18:41:38] :	 [Step 3/13] 
[18:41:38] :	 [Step 3/13] > crexi@15.2.0 prepare /opt/tc-agent/work/cd8f8b508d0cf69e
[18:41:38] :	 [Step 3/13] > husky install
[18:41:38] :	 [Step 3/13] 
[18:41:38] :	 [Step 3/13] husky - Git hooks installed
[18:41:38] :	 [Step 3/13] Done in 15.7s
[18:41:38] :	 [Step 3/13] 
[18:41:38] :	 [Step 3/13] 
[18:41:38] :	 [Step 3/13] -------- Changed files
...
[18:41:38] :	 [Step 3/13] 
[18:41:38] :	 [Step 3/13] 
[18:41:38] :	 [Step 3/13] -------- 10 latest commits
...
[18:41:38] :	 [Step 3/13] 
[18:41:38] :	 [Step 3/13] 
[18:41:38] :	 [Step 3/13] -------- commits from this build
[18:41:38] :	 [Step 3/13] 1a577884432ad60d313c2d80dabaf81067813de2
[18:41:49] :	 [Step 3/13] 
[18:41:49] :	 [Step 3/13] Apps affected: remotes-property-listing, property-listing-app, lease-app 
[18:41:49] :	 [Step 3/13] 
[18:41:49] :	 [Step 3/13] Checking lease-app ...
[18:41:49] :	 [Step 3/13] 	 Need new build for app lease-app, the build is continued.
[18:41:49] :	 [Step 3/13] 
[18:41:49]i:	 [Step 3/13] ##teamcity[setParameter name='NXAffectedStatus' value='true']
[18:41:49] :	 [Step 3/13] Process exited with code 0
[18:41:49]W: Step 4/13: Check that Node image exists in ECR (Command Line) (1s)
[18:41:49]i:	 [Step 4/13] Build step condition "NXAffectedStatus does not equal false" is satisfied
[18:41:49]i:	 [Step 4/13] Content of /opt/tc-agent/temp/agentTmp/custom_script4229207889412058608 file: 
#!/bin/bash

#Variables
# For image tag we use Node version extracted from the package.json file and suffix declared on build confgiuration level, the suffix defines the version of the distribution on which the Node image is based.
image_tag=18.13.0-bullseye-slim

echo "-------------------------"
echo ""
echo "-------------------------"

#Authentication to ECR
...DOCKER SETUP

#Build
[18:41:50]W: Step 5/13: Build WebUI (Command Line) (12m:18s)
[18:41:50]i:	 [Step 5/13] Build step condition "NXAffectedStatus does not equal false" is satisfied
[18:41:50]i:	 [Step 5/13] Content of /opt/tc-agent/temp/agentTmp/custom_script7860184655553039412 file: 
export NVM_DIR="$([ -z "${XDG_CONFIG_HOME-}" ] && printf %s "${HOME}/.nvm" || printf %s "${XDG_CONFIG_HOME}/nvm")"
[ -s "$NVM_DIR/nvm.sh" ] && \. "$NVM_DIR/nvm.sh" # This loads nvm

#Switching node and npm version to one which was found at previous step in the package.json file
nvm use 18.13.0

pnpm install
pnpm nx run lease-app:build-app --environment=production

[18:41:50] :	 [Step 5/13] Starting: /opt/tc-agent/temp/agentTmp/custom_script7860184655553039412
[18:41:50] :	 [Step 5/13] in directory: /opt/tc-agent/work/cd8f8b508d0cf69e
[18:41:51] :	 [Step 5/13] Now using node v18.13.0 (npm v9.6.4)
[18:41:52] :	 [Step 5/13] Lockfile is up to date, resolution step is skipped
[18:41:52] :	 [Step 5/13] Already up to date
[18:41:53] :	 [Step 5/13] 
[18:41:53] :	 [Step 5/13] 
[18:41:53] :	 [Step 5/13] > crexi@15.2.0 postinstall /opt/tc-agent/work/cd8f8b508d0cf69e
[18:41:53] :	 [Step 5/13] > ngcc --create-ivy-entry-points
[18:41:53] :	 [Step 5/13] 
[18:41:54] :	 [Step 5/13] 
[18:41:54] :	 [Step 5/13] > crexi@15.2.0 prepare /opt/tc-agent/work/cd8f8b508d0cf69e
[18:41:54] :	 [Step 5/13] > husky install
[18:41:54] :	 [Step 5/13] 
[18:41:54] :	 [Step 5/13] husky - Git hooks installed
[18:41:54] :	 [Step 5/13] Done in 2.7s
[18:41:54] :	 [Step 5/13] 
[18:41:54] :	 [Step 5/13] > crexi@15.2.0 nx /opt/tc-agent/work/cd8f8b508d0cf69e
[18:41:54] :	 [Step 5/13] > nx "run" "lease-app:build-app" "--environment=production"
[18:41:54] :	 [Step 5/13] 
[18:41:56] :	 [Step 5/13] 
[18:41:56] :	 [Step 5/13] > nx run lease-app:build-app --environment=production
[18:41:56] :	 [Step 5/13] 
[18:41:57] :	 [Step 5/13]  [2m>  [22m [2mnx run [22m lease-app:nx-high-memory run lease-app:build:production
[18:41:59] :	 [Step 5/13]  [2m>  [22m [2mnx run [22m lease-app:build:production
[18:42:02]W:	 [Step 5/13] - Generating browser application bundles (phase: setup)...
[18:42:02]W:	 [Step 5/13]     TypeScript compiler options "target" and "useDefineForClassFields" are set to "ES2022" and "false" respectively by the Angular CLI. To control ECMA version and features use the Browerslist configuration. For more information, see https://angular.io/guide/build#configuring-browser-compatibility
[18:42:02]W:	 [Step 5/13]     NOTE: You can set the "target" to "ES2022" in the project's tsconfig to remove this warning.
[18:42:11]W:	 [Step 5/13] - @ngui/map [es2015/esm2015] (git+https://github.com/ng2-ui/map.git)
[18:42:12]W:	 [Step 5/13] - @swimlane/ngx-datatable [es2015/esm2015] (git+https://github.com/swimlane/ngx-datatable.git)
[18:42:14]W:	 [Step 5/13] - ng2-dragula [es2015/esm2015] (git+https://github.com/valor-software/ng2-dragula.git)
[18:42:15]W:	 [Step 5/13] - ng2-file-upload [es2015/esm2015] ()
[18:42:15]W:	 [Step 5/13] - @ngx-share/core [es2015/esm2015] (git://github.com/murhafsousli/ngx-sharebuttons.git)
[18:42:18]W:	 [Step 5/13] - ngx-window-token [es2015/esm2015] (https://github.com/maxisam/ngx-window-token)
[18:42:18]W:	 [Step 5/13] - ngx-clipboard [es2015/esm2015] (https://github.com/maxisam/ngx-clipboard)
[18:42:19]W:	 [Step 5/13] - @swimlane/ngx-charts [es2015/esm2015] (git+https://github.com/swimlane/ngx-charts.git)
[18:42:20]W:	 [Step 5/13] - @ngx-gallery/core [es2015/esm2015] (git://github.com/murhafsousli/ngx-gallery.git)
[18:47:50]W:	 [Step 5/13] ✔ Browser application bundle generation complete.
[18:48:06]W:	 [Step 5/13] ✔ Browser application bundle generation complete.
[18:48:06]W:	 [Step 5/13] - Generating index html...
[18:48:13]W:	 [Step 5/13] - Generating index html...
[18:48:13]W:	 [Step 5/13] 1 rules skipped due to selector errors:
[18:48:13]W:	 [Step 5/13]   .property-overview .uib-dropdown+* -> Cannot read properties of undefined (reading 'type')
[18:48:13]W:	 [Step 5/13] ✔ Index html generation complete.
[18:48:13] :	 [Step 5/13] Initial Chunk Files           | Names                                                                             |  Raw Size | Estimated Transfer Size
[18:48:13] :	 [Step 5/13] main.c0a6ebf44b9b1db9.js      | main                                                                              |   6.11 MB |                 1.00 MB
[18:48:13] :	 [Step 5/13] styles.9356ced32c3cbe97.css   | styles                                                                            | 851.41 kB |               153.77 kB
[18:48:13] :	 [Step 5/13] polyfills.555200887b1a308d.js | polyfills                                                                         |  38.12 kB |                12.10 kB
[18:48:13] :	 [Step 5/13] runtime.2b579a69c8282c21.js   | runtime                                                                           |   4.66 kB |                 2.24 kB
[18:48:13]W:	 [Step 5/13] Warning: /opt/tc-agent/work/cd8f8b508d0cf69e/apps/lease/src/app/app.component.ts depends on 'dayjs'. CommonJS or AMD dependencies can cause optimization bailouts.
[18:48:13] :	 [Step 5/13] | Initial Total                                                                     |   6.99 MB |                 1.17 MB
[18:48:13] :	 [Step 5/13] Lazy Chunk Files              | Names                                                                             |  Raw Size | Estimated Transfer Size
...THE LIST OF LAZY CHUNKS

[18:48:13] :	 [Step 5/13] Build at: 2023-06-15T18:48:13.506Z - Hash: 78e4b708bfb660c0 - Time: 370318ms
[18:48:13]W:	 [Step 5/13] Warning: /opt/tc-agent/work/cd8f8b508d0cf69e/node_modules/.pnpm/@deck.gl+layers@8.8.11_@deck.gl+core@8.9.18_@loaders.gl+core@3.4.4_@luma.gl+core@8.5.20/node_modules/@deck.gl/layers/dist/esm/solid-polygon-layer/polygon.js depends on 'earcut'. CommonJS or AMD dependencies can cause optimization bailouts.
[18:48:13]W:	 [Step 5/13] For more info see: https://angular.io/guide/build#configuring-commonjs-dependencies
[18:48:13]W:	 [Step 5/13] Warning: /opt/tc-agent/work/cd8f8b508d0cf69e/node_modules/.pnpm/@deck.gl+layers@8.8.11_@deck.gl+core@8.9.18_@loaders.gl+core@3.4.4_@luma.gl+core@8.5.20/node_modules/@deck.gl/layers/dist/esm/text-layer/font-atlas-manager.js depends on '@mapbox/tiny-sdf'. CommonJS or AMD dependencies can cause optimization bailouts.
[18:48:13]W:	 [Step 5/13] For more info see: https://angular.io/guide/build#configuring-commonjs-dependencies
[18:48:13]W:	 [Step 5/13] Warning: /opt/tc-agent/work/cd8f8b508d0cf69e/node_modules/.pnpm/@sentry+integrations@7.47.0/node_modules/@sentry/integrations/esm/offline.js depends on 'localforage'. CommonJS or AMD dependencies can cause optimization bailouts.
[18:48:13]W:	 [Step 5/13] For more info see: https://angular.io/guide/build#configuring-commonjs-dependencies
[18:48:13]W:	 [Step 5/13] Warning: /opt/tc-agent/work/cd8f8b508d0cf69e/node_modules/.pnpm/@splitsoftware+splitio@10.15.9/node_modules/@splitsoftware/splitio/es/impressions/counter.js depends on 'object-assign'. CommonJS or AMD dependencies can cause optimization bailouts.
[18:48:13]W:	 [Step 5/13] For more info see: https://angular.io/guide/build#configuring-commonjs-dependencies
[18:48:13]W:	 [Step 5/13] Warning: /opt/tc-agent/work/cd8f8b508d0cf69e/node_modules/.pnpm/@splitsoftware+splitio@10.15.9/node_modules/@splitsoftware/splitio/es/readiness/index.js depends on 'events'. CommonJS or AMD dependencies can cause optimization bailouts.
[18:48:13]W:	 [Step 5/13] For more info see: https://angular.io/guide/build#configuring-commonjs-dependencies
[18:48:13]W:	 [Step 5/13] Warning: bundle initial exceeded maximum budget. Budget 2.00 MB was not met by 4.99 MB with a total of 6.99 MB.
[18:48:21] :	 [Step 5/13]  
[18:48:21] :	 [Step 5/13]   [32m> [39m  [0m [7m [1m [32m NX  [39m [22m [27m [0m   [32mSuccessfully ran target build for project lease-app [39m
[18:48:22] :	 [Step 5/13]  
[18:48:22] :	 [Step 5/13]   [32m> [39m  [0m [7m [1m [32m NX  [39m [22m [27m [0m   [32mSuccessfully ran target nx-high-memory for project lease-app [39m
[18:48:23] :	 [Step 5/13]  [2m>  [22m [2mnx run [22m lease-app:nx-high-memory run lease-app:server:production
[18:48:25] :	 [Step 5/13]  [2m>  [22m [2mnx run [22m lease-app:server:production
[18:48:27]W:	 [Step 5/13] - Generating server application bundles (phase: setup)...
[18:48:27]W:	 [Step 5/13]     TypeScript compiler options "target" and "useDefineForClassFields" are set to "ES2022" and "false" respectively by the Angular CLI. To control ECMA version and features use the Browerslist configuration. For more information, see https://angular.io/guide/build#configuring-browser-compatibility
[18:48:27]W:	 [Step 5/13]     NOTE: You can set the "target" to "ES2022" in the project's tsconfig to remove this warning.
[18:53:46]W:	 [Step 5/13] ✔ Server application bundle generation complete.
[18:54:00]W:	 [Step 5/13] ✔ Server application bundle generation complete.
[18:54:00] :	 [Step 5/13] Initial Chunk Files | Names                                                                             |  Raw Size
[18:54:00] :	 [Step 5/13] main.js             | main                                                                              |  13.05 MB |
[18:54:00] :	 [Step 5/13] | Initial Total                                                                     |  13.05 MB
[18:54:00] :	 [Step 5/13] Lazy Chunk Files    | Names                                                                             |  Raw Size
...THE LIST OF LAZY CHUNKS
[18:54:00] :	 [Step 5/13] Build at: 2023-06-15T18:54:00.455Z - Hash: 0353ee71aaac9f6a - Time: 332776ms
[18:54:02] :	 [Step 5/13]  
[18:54:02] :	 [Step 5/13]   [32m> [39m  [0m [7m [1m [32m NX  [39m [22m [27m [0m   [32mSuccessfully ran target server for project lease-app [39m
[18:54:03] :	 [Step 5/13]  
[18:54:03] :	 [Step 5/13]   [32m> [39m  [0m [7m [1m [32m NX  [39m [22m [27m [0m   [32mSuccessfully ran target nx-high-memory for project lease-app [39m
[18:54:09] :	 [Step 5/13] 
[18:54:09] :	 [Step 5/13]  
[18:54:09] :	 [Step 5/13] 
[18:54:09] :	 [Step 5/13]  >  NX   Successfully ran target build-app for project lease-app
[18:54:09] :	 [Step 5/13] 
[18:54:09] :	 [Step 5/13] 
[18:54:09] :	 [Step 5/13]    View logs and investigate cache misses at https://cloud.nx.app/runs/LG1vSpmIN5
[18:54:09] :	 [Step 5/13] 
[18:54:09] :	 [Step 5/13] Process exited with code 0
[18:54:09] : Step 6/13: URL Replacement (Command Line) (2s)
[18:54:09]i:	 [Step 6/13] Build step condition "NXAffectedStatus does not equal false" is satisfied
[18:54:09]i:	 [Step 6/13] Content of /opt/tc-agent/temp/agentTmp/custom_script7127556472909604467 file: 
#Replacing local links with links to CloudFront
find ./dist/apps/lease -type f -regex ".*\.\(html\|css\|js\)" -exec sed -i 's/\([\"\`'\'']\)\.*\/content\//\1https:\/\/files.crexi.com\/web\/content\//g' {} \;
find ./dist/apps/lease -type f -regex ".*\.\(html\|css\|js\)" -exec sed -i 's/\([\"\`'\'']\)\.*\/lease\/content\//\1https:\/\/files.crexi.com\/web\/content\//g' {} \;
find ./dist/apps/lease -type f -regex ".*\.\(html\|css\|js\)" -exec sed -i 's/\(url'\('\)\/*content\//\1https:\/\/files.crexi.com\/web\/content\//g' {} \;
find ./dist/apps/lease -type f -regex ".*\.\(html\|css\|js\)" -exec sed -i 's/\(url'\('\)\/*lease\/content\//\1https:\/\/files.crexi.com\/web\/content\//g' {} \;
find ./dist/apps/lease -type f -regex ".*\.\(html\|css\|js\)" -exec sed -i 's/, *\/content\//, https:\/\/files.crexi.com\/web\/content\//g' {} \;
    
...NOT RELATED TO THE BUILD STUFF

@JoostK
Copy link
Member

JoostK commented Jun 16, 2023

That sounds plausable; ngcc has to have completed before subsequent build steps can be started.

@DzmVasileusky
Copy link
Author

Solved:
it came out that pnpm and ngcc aren't playing well toghether.
I had to add node-linker=hoisted to .npmrc to make pnpm to preserve npm like node modules structure which made possible finding modules by ngcc.
--loglevel=debug was a real help.

@JoostK thank you for helping with an issue

@angular-automatic-lock-bot
Copy link

This issue has been automatically locked due to inactivity.
Please file a new issue if you are encountering a similar or related problem.

Read more about our automatic conversation locking policy.

This action has been performed automatically by a bot.

@angular-automatic-lock-bot angular-automatic-lock-bot bot locked and limited conversation to collaborators Jul 21, 2023
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
area: compiler Issues related to `ngc`, Angular's template compiler needs reproduction This issue needs a reproduction in order for the team to investigate further
Projects
None yet
Development

No branches or pull requests

2 participants