Questions tagged [ng-packagr]

a tool to transpile your libraries to Angular Package Format

Resources:

  1. GitHub: https://github.com/dherges/ng-packagr
  2. NPM: https://www.npmjs.com/package/ng-packagr
  3. Example: https://github.com/dherges/ng-packaged
247 questions
0
votes
1 answer

No provider for InjectionToken ng.v5.defaultTsConfig

I have a problem when I was execute npm run build. In the terminal an error appears: No provider for InjectionToken ng.v5.defaultTsConfig! (InjectionToken ng.v5.packageTransform -> InjectionToken ng.v5.initTsConfigTransform -> InjectionToken…
0
votes
0 answers

NG8001: 'some-component' is not a known element - angular 13

I use angular 13.3. I have a project that name is "pazh-base-source" that some of my base component is in it such as pazh-component.ts . I want to use this components in my main project. I export the pazh-component in app module in pazh-base-source,…
0
votes
0 answers

Link angular library projects together

Our angular application is getting refactor to be split up into multiple small libraries. However we are having problems creating the links in between the libraries. Most articles explain in details how they can be created, their advantages, but so…
Stefan
  • 14,826
  • 17
  • 80
  • 143
0
votes
0 answers

Creating npm package (Angular) and getting "Module not found" from dependency

I have created a Angular npm package (with ng-packgr) that uses the npm package jwt-decode, when I updated to Angular 14 in the project of the npm package and then used it in a different project I get "Module not found: Error: Can't resolve…
0
votes
0 answers

How to customize packaging?

Use Abp to create an angular+. netcore project. The Abp version is 5.1.1 and the angular version is 8.2.4. enter image description here enter image description here Some errors occurred when using the command 'npm run packagr' for custom packaging…
huhao
  • 11
  • 2
0
votes
1 answer

Does ng-packagr generate script who can run in the browser like normal js?

Can I use ng-packagr to build library with one script file that can run on the browser in the html by import as ? For example I have main.ts that do console.log('hello'); and I want to create index.html and import…
Jon Sud
  • 10,211
  • 17
  • 76
  • 174
0
votes
0 answers

Can't find a module error when I'm running ng-packagr

I'm having a really annoying error when I'm running my ng-packagr to build a NPM library to publish. Using nx monorepo, The error: ng-packagr -p libs/ui/ng-package.json Building Angular…
hackp0int
  • 4,052
  • 8
  • 59
  • 95
0
votes
1 answer

How to get ng-packagr to recognize a Typescript type definition

Since upgrading to Typescript 4.4.2 (needed to support Angular 13), the require syntax is no longer supported. Now it seems I must use this syntax instead: import * as d3ContextMenu from 'd3-context-menu'; Type definitions don't exist for…
HankScorpio
  • 3,612
  • 15
  • 27
0
votes
0 answers

Metadata collected contains an error that will be reported at runtime: Reference to a non-exported function

When I am building the angular UI library using ng-packagr I am having the below regex defined in the file >…
Prashant Biradar
  • 301
  • 5
  • 14
0
votes
1 answer

Angular build monorepo into one package

I am currently refactoring all of our Angular repositories into one Nx monorepo. All of the repos are libraries, and currently build into separate packages. My company would like to build these libraries into one large package as well. Is this…
DJNeko
  • 13
  • 4
0
votes
1 answer

Angular Library - Live reload is not working

On my Angular workspace setup, I got 3 libs and one app (more will come in future). The TypeScript paths setup is like so: "paths": { "@lib/a/*": [ "projects/libs/a/*", "projects/libs/a" ], "@lib/a": [ …
spcmnd
  • 1
  • 2
0
votes
0 answers

Inline images in CSS in angular library

I have an angular library that was created via ng generate library my-lib command. I need all images to be encoded to base64 in CSS files. The images with relative URL are encoded to base64. But images with absolute paths aren't encoded. For example…
Ildar
  • 3,808
  • 7
  • 45
  • 81
0
votes
1 answer

Custom Angular library component not rendering in template

I am trying to consume 2 custom Angular 9 libraries. One contains services and the other components. I seems that I imported the services and module containing the components correctly in my consuming app.module. The library with the services…
afriedman111
  • 1,925
  • 4
  • 25
  • 42
0
votes
2 answers

ng-packagr Unable to publish the Angular package to npm OR how to Fix Angular Valunerablities

I am facing this error while publish the package to the npm using the npm publish command: error code E403 error 403 403 Forbidden - PUT https://registry.npmjs.org/dist - You do not have permission to publish "dist". Are you logged in as the…
0
votes
1 answer

Angular ng build --watch seems to be broken in angular version 11

During development of angular libraries, I build the libraries on-the-fly using the ng build --watch. Setup is according to the official Angular docs at: https://angular.io/guide/creating-libraries I am symlinking the libraries into my…
jjmurre
  • 392
  • 4
  • 15