ERROR: NGCC failed when tring to compile Angular library

Hi all,

Trying to debug the static Angular library QBM in order to debug the standard web portal. When issuing the command "npm run build:watch qbm", I  get the following error:

PS C:\anguar-identitymanager-imx\identitymanager-imx-test\imxweb> npm run build:watch qbm

> imxweb@9.2.0 build:watch
> ng build --watch --configuration development qbm

Building Angular Package
WARNING: Project is attempting to disable the Ivy compiler. Angular versions 13 and higher do not support View Engine compiler for libraries. The Ivy compiler will be used to build this project.
For additional information or if the build fails, please see v12.angular.io/.../ivy

------------------------------------------------------------------------------
Building entry point 'qbm'
------------------------------------------------------------------------------
\ Compiling with Angular sources in Ivy partial compilation mode.node:internal/process/esm_loader:97
internalBinding('errors').triggerUncaughtException(
^

Error [ERR_MODULE_NOT_FOUND]: Cannot find module 'C:\anguar-identitymanager-imx\identitymanager-imx-test\imxweb\node_modules\yargs\index.mjs' imported from C:\anguar-identitymanager-imx\identitymanager-imx-test\imxweb\node_modules\@angular\compiler-cli\bundles\chunk-FM6NPN5V.js
Did you mean to import yargs/index.cjs?
at new NodeError (node:internal/errors:399:5)
at finalizeResolution (node:internal/modules/esm/resolve:326:11)
at moduleResolve (node:internal/modules/esm/resolve:945:10)
at defaultResolve (node:internal/modules/esm/resolve:1153:11)
at nextResolve (node:internal/modules/esm/loader:163:28)
at ESMLoader.resolve (node:internal/modules/esm/loader:838:30)
at ESMLoader.getModuleJob (node:internal/modules/esm/loader:424:18)
at ModuleWrap.<anonymous> (node:internal/modules/esm/module_job:77:40)
at link (node:internal/modules/esm/module_job:76:36) {
code: 'ERR_MODULE_NOT_FOUND'
}

Node.js v18.16.1
× Compiling with Angular sources in Ivy partial compilation mode.
ERROR: NGCC failed.

My client is using the following versions:

PS C:\anguar-identitymanager-imx\identitymanager-imx-test\imxweb> npm version
{
imxweb: '9.2.0',
npm: '9.7.2',
node: '18.16.1',
acorn: '8.8.2',
ada: '1.0.4',
ares: '1.19.1',
brotli: '1.0.9',
cldr: '42.0',
icu: '72.1',
llhttp: '6.0.11',
modules: '108',
napi: '8',
nghttp2: '1.52.0',
nghttp3: '0.7.0',
ngtcp2: '0.8.1',
openssl: '3.0.9+quic',
simdutf: '3.2.2',
tz: '2022g',
undici: '5.21.0',
unicode: '15.0',
uv: '1.44.2',
uvwasi: '0.0.15',
v8: '10.2.154.26-node.26',
zlib: '1.2.13'
}

This has never worked so far. Installed 1IM version is 9.2

Parents
  • Hi, Andreas,

    My versions are:

    {
    imxweb: '9.2.0',
    npm: '6.14.18',
    ares: '1.18.1',
    brotli: '1.0.9',
    cldr: '40.0',
    icu: '70.1',
    llhttp: '2.1.6',
    modules: '83',
    napi: '8',
    nghttp2: '1.42.0',
    node: '14.21.3',
    openssl: '1.1.1t',
    tz: '2022f',
    unicode: '14.0',
    uv: '1.42.0',
    v8: '8.4.371.23-node.88',
    zlib: '1.2.11'
    }

    and the library builds alright:

    > imxweb@9.2.0 build:watch D:\Aplicaciones\desarrollo\juancarloscamargo\iam92\imxweb
    > ng build --watch --configuration development "qbm"

    Building Angular Package

    ------------------------------------------------------------------------------
    Building entry point 'qbm'
    ------------------------------------------------------------------------------
    Heavy check mark Compiling with Angular sources in Ivy full compilation mode.
    Heavy check mark Writing FESM bundles
    Heavy check mark Copying assets
    Heavy check mark Writing package manifest
    Heavy check mark Built qbm

    ------------------------------------------------------------------------------
    Built Angular Package
    - from: D:\Aplicaciones\desarrollo\juancarloscamargo\iam92\imxweb\projects\qbm
    - to: D:\Aplicaciones\desarrollo\juancarloscamargo\iam92\imxweb\dist\qbm
    ------------------------------------------------------------------------------

    Build at: 2023-12-19T10:04:37.407Z - Time: 26557ms


    Compilation complete. Watching for file changes...

    Followed the steps in the documentation (https://support.oneidentity.com/es-es/technical-documents/identity-manager/9.2/html5-development-guide/2#TOPIC-2085652)

    Did the npm install finish without errors?

    Hth!

Reply
  • Hi, Andreas,

    My versions are:

    {
    imxweb: '9.2.0',
    npm: '6.14.18',
    ares: '1.18.1',
    brotli: '1.0.9',
    cldr: '40.0',
    icu: '70.1',
    llhttp: '2.1.6',
    modules: '83',
    napi: '8',
    nghttp2: '1.42.0',
    node: '14.21.3',
    openssl: '1.1.1t',
    tz: '2022f',
    unicode: '14.0',
    uv: '1.42.0',
    v8: '8.4.371.23-node.88',
    zlib: '1.2.11'
    }

    and the library builds alright:

    > imxweb@9.2.0 build:watch D:\Aplicaciones\desarrollo\juancarloscamargo\iam92\imxweb
    > ng build --watch --configuration development "qbm"

    Building Angular Package

    ------------------------------------------------------------------------------
    Building entry point 'qbm'
    ------------------------------------------------------------------------------
    Heavy check mark Compiling with Angular sources in Ivy full compilation mode.
    Heavy check mark Writing FESM bundles
    Heavy check mark Copying assets
    Heavy check mark Writing package manifest
    Heavy check mark Built qbm

    ------------------------------------------------------------------------------
    Built Angular Package
    - from: D:\Aplicaciones\desarrollo\juancarloscamargo\iam92\imxweb\projects\qbm
    - to: D:\Aplicaciones\desarrollo\juancarloscamargo\iam92\imxweb\dist\qbm
    ------------------------------------------------------------------------------

    Build at: 2023-12-19T10:04:37.407Z - Time: 26557ms


    Compilation complete. Watching for file changes...

    Followed the steps in the documentation (https://support.oneidentity.com/es-es/technical-documents/identity-manager/9.2/html5-development-guide/2#TOPIC-2085652)

    Did the npm install finish without errors?

    Hth!

Children