Questions tagged [angular-workspace-configuration]

For questions related to the angular.json file at the root level of an Angular workspace, which provides workspace-wide and project-specific configuration defaults for build and development tools provided by the Angular CLI.

Angular Workspace Configuration
A file named angular.json at the root level of an Angular workspace provides workspace-wide and project-specific configuration defaults for build and development tools provided by the Angular CLI. Path values given in the configuration are relative to the root workspace folder.

What Questions Should Have this Tag
Use this tag when your question is specifically related to the configuration of an Angular application which may relate to the angular.json file or the Angular CLI.

Learning more about Angular Workspace Configuraton


17 questions
6
votes
2 answers

Angular Workspace/Monorepo, forRoot giving me errors. "A value for 'forRoot' cannot be determined statically, as it is an external declaration."

I'm having a library called Themex. //envInjector.ts import {InjectionToken} from "@angular/core"; export const ENVIRONMENT = new InjectionToken<{[key: string]: any}>('ENVIRONMENT'); //themex.module.ts import {ENVIRONMENT} from…
harikrish
  • 2,009
  • 3
  • 19
  • 37
3
votes
1 answer

Configure `jest-preset-angular` with angular workspace

File structure: - projects - projectA - tsconfig.app.json - tsconfig.spec.json - projectB - tsconfig.app.json - tsconfig.spec.json - jest.config.js - setup-jest.ts - tsconfig.base.json - tsconfig.json I followed the installation…
2
votes
1 answer

nx workspace angular monorepo throws error while creating new app

I am creating new angular monorepo application, I run following command: npx create-nx-workspace explorer --preset=angular but I am getting following error once it executes: √ Installing dependencies with npm × Creating your workspace in explorer …
Vikas Kad
  • 1,013
  • 1
  • 18
  • 38
1
vote
1 answer

Adding Angular material and consuming in workspace throws inject error

I started with Angular Workspace, 1. Project 1 2. Project 2 3. SharedLib //The sharedlibrary in Project1 and Project2, I imported the sharedLib. In SharedLib, I created a component with Material Button Component. @NgModule({ declarations: [ …
1
vote
0 answers

Angular Library Import Errors With Multiple Entry Points

I am using Angular Workspaces and creating an additional entry point for AG-Grid inside of the Angular library to reduce the initial main bundle size as the grid isn't needed right away. My app structure is: projects my-library ag-grid …
1
vote
1 answer

angular build compilation error even library is available

I am getting kind of compilation failures while building an app. node_modules/@mycomp/lib-my-pat/shared/store/selectors/filter.selector.d.ts:5:75 - error TS2304: Cannot find name 'Interval'. const getDateInterval:…
1
vote
1 answer

Cannot find module or its corresponding type declarations when using my own library

I created a workspace with applications and my first library which was created with the command ng g library breeze-helpers (breeze-helpers is the name of my library) Then I built the library with ng build breeze-helpers --watch. It is successfully…
Sam
  • 13,934
  • 26
  • 108
  • 194
1
vote
1 answer

stylePreprocessorOptions includePaths is not importing my scss files

I have started using Angular multi-projects workspace. So I created a style folder which contains all my shared scss files. In the angular.json file, for each project I have added the following in the architect/build/options section: …
Sam
  • 13,934
  • 26
  • 108
  • 194
1
vote
2 answers

Angular.json styles "inject" is not a valid property

I'm trying to add some custom styles to angular.json > "projects" > "app-name" > "architect" > "build" > "options" > "styles" but when I add my style object, the Property inject is not allowed. { "input": "src/assets/theme/client-a-style.css", …
1
vote
2 answers

How can I pass an npm param to angular.json

I'm a newbie in angular trying to pass a parameter to my angular build process. I want to build my app for a specific client so I'm using npm variables to copy the client settings: npm run build --client=cocacola However, I cannot figure out how to…
0
votes
0 answers

angular multiple project same vendor.js

In Angular 12, I have 3 projects and library in one namespace. -projects: --library --project1 --project2 --project3 Each of them is build to separate destination (domains). Whne build to production, vendor.js is almost the same for each project.…
0
votes
1 answer

How to maintain consistent Angular versions when using ( Spring Boot + Angular ) hybrid projects structure?

As stated above, I have a couple of projects built with Spring + Angular architecture. It was all going smoothly when we started, but once I started updating Angular versions to keep it current, things started getting complicated; the usual…
Guru
  • 17
  • 1
  • 10
0
votes
1 answer

Creating NX Monorepo with concrete (older) Angular version

Generating NX Monorepo Workspace (https://nx.dev/) is straight forward here the steps: npx create-nx-workspace (to create empty workspace) yarn add -D @nrwl/angular (to add nx's angular plugin/schematics) nx generate worspace-schematic:application…
Hivaga
  • 3,738
  • 4
  • 23
  • 36
0
votes
1 answer

Build two variation of the same projects with Angular

I am working on a project which requires creating two variations of the same website (male and female) The two projects must each be in a different path, the first www.website.com/male/somelink and the second www.website.com/female/somelink The two…
0
votes
1 answer

Angular libraries : How to switch from npm package to npm sym link?

Within my Angular workspace, I have one Application and one Library. The library is referenced in the application using a sym link (npm link my-lib) and I updated my tsconfig.json to know about the path of my library: "paths": { "my-lib": [ …
Sam
  • 13,934
  • 26
  • 108
  • 194
1
2