ng-packagr Questions

7

Solved

I have an Angular CLI workspace containing two library projects, foo and bar. When I build the second of the two libraries, foo, the build fails with the following error: error TS6059: File '/co...
Absinthe asked 14/8, 2018 at 21:32

4

Solved

I am building a library which contains a custom icon font. However, when I build my library using ng build <library-name> --prod, the assets folder is not included in the build, which means i...
Wendolyn asked 31/8, 2019 at 19:23

4

Solved

I am converting an angular app to angular lib. I generated angular lib project and slowly moving the modules. I now get the following error while building the library. ng build lib Error Cann...
Debatable asked 14/4, 2019 at 6:39

3

Solved

I am creating a component library with the Angular CLI (v7.x) and am having trouble figuring out how I get 3rd party font assets needed for css rules to be included in my dist folder generated by n...
Silures asked 11/4, 2019 at 11:7

1

I'm developing an npm package with Angular. While building the lib, I get the following error: Unsupported private class MyLibComponent. This class is visible to consumers via MyLibModule -> My...
Khaddar asked 18/3, 2021 at 8:37

1

I have a monorepo using NX & Angular and I am publishing some libs to NPM and i have the following scenario apps only_App libs lib_A // v1.0.0 lib_B // v1.0.0 lib_C // v1.0.0 lib_A depends...
Conglobate asked 16/6, 2022 at 12:12

3

Solved

Im upgrading a private angular library/package (my-lib) so i can migrate all other projects, but when imported into a project one of the services uses moment and throws an error: "ERROR TypeEr...
Incensory asked 8/2, 2022 at 17:37

5

Solved

When building an Angular Library application, is there an automated way to keep the root level package.json and the library application's package.json (e.g. under projects/my-library) file versions...
Gilbart asked 6/6, 2019 at 21:25

2

When compiling an Angular library, I am getting this error concerning rootDir of my sub libraries library/services/src/public-api.ts:31:15 - error TS6059: File 'C:/libname/library/services/src/orde...
Shaggy asked 2/1, 2021 at 12:12

2

I have an Angular 5 project that uses ngrx/store. The project consists of an application and a shared library that the application uses. Up until today, we had been compiling the TypeScript for bot...
Quetzal asked 10/5, 2018 at 0:57

6

I'm writing an Angular 6 Library and cannot figure out how to step into the typescript. I generated the app using: ng new mylibapp I then added the library using: ng g library @abc/cool-lib -p ab...

2

I am working on an Nx powered monorepo, building a bunch of libs written in angular and packaged with ng-packagr. When building the sources I am seeing a bunch of warnings like this: WARNING: &quot...
Jinni asked 4/2, 2019 at 15:51

2

While building an angular 13 package with sub entries, I'm getting the warning below. Building Angular Package WARNING: Found configuration in ...<PATH_TO_PACKAGE>/package.json. Configuring n...
Vermin asked 2/12, 2021 at 14:11

2

Solved

The Goal: I am trying to include a path from my library so I can use an @import statement to include the scss files in my application like so: @import "some-scss-in-my-lib" The Problem: ...
Epigene asked 17/8, 2020 at 10:25

1

I have an Angular 11 library using Bootstrap 4.5 ng-packagr uses SASS 1.34 which yields a lot of warning about the deprecation of the division operator, which is used a lot in Bootstrap (https://sa...
Devotion asked 4/6, 2021 at 12:29

1

Solved

I got the following warning in my cli and was wondering what was the new allowedNonPeerDependencies doing different. WARNING: Option "whitelistedNonPeerDependencies" is deprecated: Use &q...
Cambridgeshire asked 23/3, 2021 at 7:34

1

I have a pure javascript library that users can install via npm. I want to add/create an Angular "wrapper" to this library so that it can be used seamlessly within Angular projects but I am not sur...
Camouflage asked 14/8, 2018 at 21:23

2

Solved

When defining an APP_INITIALIZER in a library module, the build fails with the Lambda not supported error. The build error is thrown when the function is exported as per docs: import { NgModule, A...
Florin asked 22/8, 2018 at 23:58

1

Solved

I have an angular library with store implementation and this library is packaged as a NPM and used in different angular application. I'm trying to use a ngrx store selector which was exported in th...
Smithereens asked 26/1, 2021 at 14:52

5

Upon building & packaging an Angular 6 library, I can't seem to be able to instruct the Angular CLI to copy the library's assets into the dist/assets folder on every build. Assuming the projec...
Moonshiner asked 30/5, 2018 at 3:22

2

Solved

I have several apps in my Angular monorepo project. Also there are about 5 libraries I've written to use across the apps. What I want to know is how to better build/architect these libraries. The...
Wilderness asked 23/7, 2019 at 19:25

0

Setup: Angular 9 workspace with libraries, a test app and storybook using CDK's _overlay.scss in a .scss file with @use. .storybook/ node_modules/ projects/ - library/ - src/ - lib/ - component...
Sfumato asked 7/5, 2020 at 12:24

1

Solved

WARNING: No name was provided for external module 'moment' in output.globals – guessing 'momentImported' WARNING: No name was provided for external module 'odata-parser' in output.globals – guessin...
Hymie asked 24/4, 2020 at 6:56

1

I used postcss, postcss-css-modules and posthtml-css-modules to implement CSS Modules in a Angular Application. I also used @angular-builders/custom-webpack to achieved this. Now, I want to do the...
Education asked 30/3, 2020 at 18:29

5

Solved

Could anyone give a hint where to start to include images and css files into Angular library using ng-packagr?
Veteran asked 27/9, 2017 at 8:27

© 2022 - 2024 — McMap. All rights reserved.