Despite to attempts to install log4js2 (the npm site and the project site give 2 slightly different instructions - see below), I cannot get my (otherwise running) application to compile with log4js2.
This is a pity, as the package looks really nice.
First attempt: npm install --save log4js2
Second attempt: npm i -S @log4js2/core
Configuration:
node -v: v10.10.0
npm -v: 6.5.0
tsc -v: Version 3.2.2
OS: ubuntu 18.04LTS
Error message:
ng serve
** Angular Live Development Server is listening on localhost:4200, open your browser on http://localhost:4200/ **
Date: 2019-01-05T21:37:01.194Z
Hash: 03341d5060cdfc2426d5
Time: 10657ms
chunk {main} main.js, main.js.map (main) 105 kB [initial] [rendered]
chunk {polyfills} polyfills.js, polyfills.js.map (polyfills) 223 kB [initial] [rendered]
chunk {runtime} runtime.js, runtime.js.map (runtime) 6.08 kB [entry] [rendered]
chunk {styles} styles.js, styles.js.map (styles) 554 kB [initial] [rendered]
chunk {vendor} vendor.js, vendor.js.map (vendor) 6.21 MB [initial] [rendered]
WARNING in ./node_modules/@log4js2/core/dist/appender/handler/file.handler.d.ts
Module build failed (from ./node_modules/@ngtools/webpack/src/index.js):
Error: /media/elrond_2tb/devel/angular/keyword-tree-ngrx/node_modules/@log4js2/core/dist/appender/handler/file.handler.d.ts is missing from the TypeScript compilation. Please make sure it is in your tsconfig via the 'files' or 'include' property.
The missing file seems to be part of a third party library. TS files in published libraries are often a sign of a badly packaged library. Please open an issue in the library repository to alert its author and ask them to package the library using the Angular Package Format (https://goo.gl/jB3GVv).
at AngularCompilerPlugin.getCompiledFile (/media/elrond_2tb/devel/angular/keyword-tree-ngrx/node_modules/@ngtools/webpack/src/angular_compiler_plugin.js:719:23)
at plugin.done.then (/media/elrond_2tb/devel/angular/keyword-tree-ngrx/node_modules/@ngtools/webpack/src/loader.js:41:31)
at process._tickCallback (internal/process/next_tick.js:68:7)
WARNING in ./node_modules/@log4js2/core/dist/appender/handler/file.writer.d.ts
Module build failed (from ./node_modules/@ngtools/webpack/src/index.js):
Error: /media/elrond_2tb/devel/angular/keyword-tree-ngrx/node_modules/@log4js2/core/dist/appender/handler/file.writer.d.ts is missing from the TypeScript compilation. Please make sure it is in your tsconfig via the 'files' or 'include' property.
The missing file seems to be part of a third party library. TS files in published libraries are often a sign of a badly packaged library. Please open an issue in the library repository to alert its author and ask them to package the library using the Angular Package Format (https://goo.gl/jB3GVv).
at AngularCompilerPlugin.getCompiledFile (/media/elrond_2tb/devel/angular/keyword-tree-ngrx/node_modules/@ngtools/webpack/src/angular_compiler_plugin.js:719:23)
at plugin.done.then (/media/elrond_2tb/devel/angular/keyword-tree-ngrx/node_modules/@ngtools/webpack/src/loader.js:41:31)
at process._tickCallback (internal/process/next_tick.js:68:7)
WARNING in ./node_modules/@log4js2/core/dist/appender/handler/rolling.file.handler.d.ts
Module build failed (from ./node_modules/@ngtools/webpack/src/index.js):
Error: /media/elrond_2tb/devel/angular/keyword-tree-ngrx/node_modules/@log4js2/core/dist/appender/handler/rolling.file.handler.d.ts is missing from the TypeScript compilation. Please make sure it is in your tsconfig via the 'files' or 'include' property.
The missing file seems to be part of a third party library. TS files in published libraries are often a sign of a badly packaged library. Please open an issue in the library repository to alert its author and ask them to package the library using the Angular Package Format (https://goo.gl/jB3GVv).
at AngularCompilerPlugin.getCompiledFile (/media/elrond_2tb/devel/angular/keyword-tree-ngrx/node_modules/@ngtools/webpack/src/angular_compiler_plugin.js:719:23)
at plugin.done.then (/media/elrond_2tb/devel/angular/keyword-tree-ngrx/node_modules/@ngtools/webpack/src/loader.js:41:31)
at process._tickCallback (internal/process/next_tick.js:68:7)
WARNING in ./node_modules/@log4js2/core/dist/appender/handler/file.handler.js.map 1:10
Module parse failed: Unexpected token (1:10)
You may need an appropriate loader to handle this file type.
{"version":3,"file":"file.handler.js","sourceRoot":"","sources":["../../../src/appender/handler/file.handler.ts"],"names":[],"mappings":";AAAA,mCAAkC;AAElC,+CAA2C;AAE3C,MAAa,WAAY,SAAQ,wBAAU;IAOvC,YAAoB,OAA4B;QAE5C,KAAK,EAAE,CAAC;QAFQ,YAAO,GAAP,OAAO,CAAq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AAC;SAC3B;IAEL,CAAC;CAEJ;AAtDD,kCAsDC"}
WARNING in ./node_modules/@log4js2/core/dist/appender/handler/file.writer.js.map 1:10
Module parse failed: Unexpected token (1:10)
You may need an appropriate loader to handle this file type.
{"version":3,"file":"file.writer.js","sourceRoot":"","sources":["../../../src/appender/handler/file.writer.ts"],"names":[],"mappings":";AAAA,MAAM,EAAE,GAAG,IAAI,CAAC;AAChB,MAAM,IAAI,GAAG,MAAM,CAAC;AAEpB,MAAsB,UAAU;IAKrB,MAAM,CAAC,iBAAiB,CAAC,GAAW;QAEvC,MAAM,SAAS,GAAG,UAAU,CAAC,IAAI,CAAC,GAAG,CAAC;QACtC,MAAM,aAAa,GAAG,UAAU,CAAC,IAAI,CAAC,UAAU,CAAC,GAAG,CAAC,CAAC,CAAC,CAAC,SAAS,CAAC,CAAC,CAAC,EAAE,CAAC;QACvE,MAAM,aAAa,GAAG,GAAG,CAAC;QAE1B,OAAO,GAAG,CAAC,KAAK,CAAC,SAAS,CAAC,CAAC,MAAM,CAAC,CAAC,SAAS,EAAE,QAAQ,EAAE,EAAE;YAEvD,MAAM,gBAAgB,GAAG,UAAU,CAAC,IAAI,CAAC,OAAO,CAAC,aAAa,EAAE,SAAS,EAAE,QAAQ,CAAC,CAAC;YACrF,IAAI;gBACA,UAAU,CAAC,EAAE,CAAC,SAAS,CAAC,gBAAgB,CAAC,CAAC;aAC7C;YAAC,OAAO,GAAG,EAAE;gBACV,IAAI,GAAG,CAAC,IAAI,KAAK,QAAQ,EAAE;oBACvB,OAAO,gBAAgB,CAAC;iBAC3B;gBAED,IAAI,GAAG,CAAC,IAAI,KAAK,QAAQ,EAAE;oBACvB,MAAM,IAAI,KAAK,CAAC,qCAAqC,SAAS,GAAG,CAAC,CAAC;iBACtE;gBAED,MAAM,SAAS,GAAG,CAAC,QAAQ,EAAE,OAAO,EAAE,QAAQ,CAAC,CAAC,OAAO,CAAC,GAAG,CAAC,IAAI,CAAC,GAAG,CAAC,CAAC,CAAC;gBACvE,IAAI,CAAC,SAAS,IAAI,SAAS,IAAI,gBAAgB,KAAK,UAAU,CAAC,IAAI,CAAC,OAAO,CAAC,GAAG,CAAC,EAAE;oBAC9E,MAAM,GAAG,CAAC,CAAC,2CAA2C;iBACzD;aACJ;YAED,OAAO,gBAAgB,CAAC;QAC5B,CAAC,EAAE,aAAa,CAAC,CAAC;IACtB,CAAC;IAIS,aAAa,CAAC,QAAkB;QAEtC,IAAI,IAAI,GAAG,CAAC,CAAC;QAEb,IAAI,CAAC,QAAQ,CAAC,IAAI,EAAE,CAAC;QAErB,QAAQ,CAAC,OAAO,CAAC,CAAC,OAAO,EAAE,EAAE;YACzB,IAAI,IAAI,MAAM,CAAC,UAAU,CAAC,OAAO,CAAC,CAAC;YACnC,IAAI,CAAC,QAAQ,CAAC,KAAK,CAAC,OAAO,GAAG,IAAI,CAAC,CAAC;QACxC,CAAC,CAAC,CAAC;QAEH,OAAO,CAAC,QAAQ,CAAC,GAAG,EAAE,CAAC,IAAI,CAAC,QAAQ,CAAC,MAAM,EAAE,CAAC,CAAC;QAE/C,OAAO,IAAI,CAAC;IAEhB,CAAC;IAES,aAAa,CAAC,QAAgB;QACpC,OAAO,UAAU,CAAC,EAAE,CAAC,iBAAiB,CAAC,QAAQ,EAAE;YAC7C,SAAS,EAAE,IAAI;YACf,QAAQ,EAAE,MAAM;YAChB,KAAK,EAAE,IAAI;SACd,CAAC,CAAC;IACP,CAAC;;AA1Da,aAAE,GAAG,OAAO,CAAC,GAAG,EAAE,EAAE,CAAC,CAAC;AACtB,eAAI,GAAG,OAAO,CAAC,GAAG,IAAI,EAAE,CAAC,CAAC;AAH5C,gCA8DC"}
WARNING in ./node_modules/@log4js2/core/dist/appender/handler/rolling.file.handler.js.map 1:10
Module parse failed: Unexpected token (1:10)
You may need an appropriate loader to handle this file type.
{"version":3,"file":"rolling.file.handler.js","sourceRoot":"","sources":["../../../src/appender/handler/rolling.file.handler.ts"],"names":[],"mappings":";AAAA,mCAAkC;AA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AAC,UAAU,GAAG,KAAK,CAAC;YAE5B,CAAC,CAAC,CAAC;SAEN;aAAM;YACH,IAAI,CAAC,UAAU,GAAG,KAAK,CAAC;SAC3B;IAEL,CAAC;IAEO,YAAY;QAChB,OAAO,CAAC,CAAC;IACb,CAAC;CAEJ;AAxFD,gDAwFC"}
ERROR in ./node_modules/@log4js2/core/dist/layout/formatter.js
Module not found: Error: Can't resolve 'path' in '/media/elrond_2tb/devel/angular/keyword-tree-ngrx/node_modules/@log4js2/core/dist/layout'
ℹ 「wdm」: Failed to compile.