Questions tagged [angular-cli-v7]

Usage This tag is intended for questions which ask about angular-cli Please take note that you should use the angular-cli tag for Angular CLI related questions.

The Angular CLI is a tool to initialize, develop, scaffold and maintain Angular applications

Usage:

  • This tag is intended for questions which ask about Angular CLI issues or usage.
  • Angular related questions should use the angular tag.

Asking a question

  • Mention the versions of Angular and Angular CLI that you're using.
  • Reduce your issue to a small example Post a reduced working code on stackblitz.com.

  • If there's a bug (or some unintentional behavior), try to troubleshoot the problem. (If it's a bug report, please create a new issue at Angular CLI's Github repository instead.)

Learn more

To learn more about Angular CLI, visit the following resources to help you get started:

95 questions
2
votes
1 answer

How to read port and host from environment.ts variable for angular.json configuration

Is there any way to read post number and host name form environment.ts file and run the ng serve command. My requirement is to use different port and host for Dev, QA and Prod environments. Now I am manually changing it in angular.json…
Spy1984
  • 89
  • 3
  • 12
2
votes
2 answers

Property 'click' does not exist on type 'DebugElement'

I have just started with Karma and Jasmine. I am stuck at a point where I am not able to perform a unit test on my component, the function that I want to trigger is in binding with *ngIf condition with the button for some specific…
vivkv
  • 931
  • 2
  • 14
  • 29
2
votes
0 answers

ERROR in : TypeError: Cannot read property 'flags' of undefined

I am doing migration for angular, here is the previous package.json posted: "name": "test123", "version": "0.0.0", "license": "MIT", "private": true, "dependencies": { "@angular/animations": "^4.4.6", "@angular/cli": "1.4.1", …
Chaita
  • 21
  • 1
  • 3
2
votes
1 answer

Angular 5 project is unable to upgrade in to Angular 7

My current Angular cli Version is 1.6.6 and Angular Version is 5.2.2 I am trying to update it to Angular 7 and new angular cli version is 7.3.6 When I try to upgrade using ng update @angular/cli, an error in console prints The specified command…
Dulanjaya Tennekoon
  • 2,408
  • 1
  • 18
  • 31
2
votes
1 answer

Angular 7 CLI running ng serve in my project breaks navigation for sub paths

To be clear, this is not a bug, this is a project that I inadvertently broke, I am not sure when or how. running ng --version in my project: Angular CLI: 7.3.4 Node: 10.14.1 OS: darwin x64 Angular: 7.2.7 When running ng serve, the app loads OK in…
DevMike
  • 1,630
  • 2
  • 19
  • 33
2
votes
2 answers

latest @angular-cli does not create a project with latest angular

node --version v10.14.2 npm version 6.4.1 At first, @angular-cli is not installed ng -version 'ng' is not recognized as an internal or external command I install the latest version of angular with: npm install -g @angular/cli I list global…
ovione
  • 31
  • 1
  • 5
2
votes
1 answer

Angular: How to configure 'ng serve' command to open an Incognito Mode browser?

I want to open my project in an Incognito Mode browser so that no cache is stored. Is there an Angular CLI flag that can be added to the ng serve -o command or to the Angular CLI configuration file that will support opening a browser in Incognito…
Super_Sid
  • 37
  • 1
  • 2
  • 8
2
votes
6 answers

Angular CLI project failed to compile

I've searched all the web but find not relevant solution. I've uninstalled both @angular/cli and node.js, cleared cache and reinstalled the latest version for the two both as an admin and non-admin yet no result. Below is the error message: ERROR…
Olawale Oladiran
  • 561
  • 2
  • 11
  • 19
2
votes
0 answers

How do I change the root directory Angular CLI uses for generating tests?

In my project we use the angular CLI to generate new components and services, but we'd like to move the tests into their own root directory that mirrors the sourceRoot src. For example, instead of: > ng generate service shared/services/test-service…
Andy Groff
  • 2,660
  • 1
  • 21
  • 25
2
votes
1 answer

Angular build for production fails

When I try to build for production my angular application with the following command ng build --prod --build-optimizer I get the following output: Date: 2019-01-29T08:39:12.193Z Hash: 05648c76cf91b1245f68 Time: 27920ms chunk {0}…
Dexter
  • 138
  • 2
  • 3
  • 17
2
votes
0 answers

Why does the Angular CLI prompt stopped working when initializing a new project?

I have just installed Angular CLI. When I run ng new project-name on my command line, I get a prompt asking about installations of angular-router and CSS setup. However when I run the same command to create other projects, I no longer have the…
1
vote
1 answer

Build error when attempting to use cesium with Angular CLI (v7)

I have just started working with angular-cesium and am following their getting started guide for setting up with the angular CLI. On attempting to serve my application, I am am encountering the follow error: ERROR in ./node_modules/cesium/index.js…
mindparse
  • 6,115
  • 27
  • 90
  • 191
1
vote
1 answer

'ng' is not recognized as the name of a cmdlet

I was installed new version of nodejs. I could updated the angular/cli globally on my machine. But still getting ng is not recognized as the name of the cmdlet. Is there any way to check the ng version in both visual studio code and command prompt.
Rajan Bosh
  • 239
  • 1
  • 3
  • 15
1
vote
1 answer

Error building .js files with ng build on lib

I have an app that I am trying to convert to use angular cli (v7). The app is in working order. The app consists of 2 sites and a common lib: - ui-site-1 - ui-site-2 - ui-lib I am using ng build to build and package UI-lib but there are errors on…
Oam Psy
  • 8,555
  • 32
  • 93
  • 157
1
vote
1 answer

How to deploy pwa app developed in angular-cli v7 on the top of the existing website?

I have developed a PWA app for my existing website using angular CLI v7. I want to deploy it on the top of my existing website. I want the existing website for desktop users, but for mobile users, it should open the PWA app. How can I achieve this…