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
36
votes
15 answers

TypeError: Cannot read property 'kind' of undefined at getAssignmentTargetKind

This problem started to occur when updating my Angular 6 project to 7.x. I opened an issue on the angular-cli github repo but they couldn't help. So what I did is create a new project and add all components one by one to "hopefully" notice what…
rawk
  • 508
  • 1
  • 7
  • 13
16
votes
2 answers

Angular 7 & Stripe error TS2304: Cannot find name 'Stripe'

I've installed @types/stripe-v3 and included Stripe's javascript file in a script tag in index.html. Supposedly the Angular compiler should include all files automagically from the @types node modules. Reading up on the internet and looking at…
11
votes
4 answers

Generate module with component and routing in Angular 8 (using angular cli command)

I have created new angular project using angular cli command ng new my-app Then, I wanted to create module named landing-page inside src/app directory, so i used command ng g m landing-page --routing=true which creates two files i.e. one module and…
Nirali
  • 454
  • 1
  • 6
  • 16
10
votes
4 answers

cannot find module in angular Lazy Loading

I have an angular project successfully on the Mac environment Angular CLI: 7.0.5 Node: 8.11.3 OS: darwin x64 Angular: 7.0.3 Now I am running the same code on ubuntu 18.04 with the setup Angular CLI: 7.3.9 Node: 12.9.1 OS: linux x64 Angular:…
user824624
  • 7,077
  • 27
  • 106
  • 183
9
votes
0 answers

How to use 'url-loader' with angular-cli compiler

Usually I run my projects and build my SASS files with WebPack, which I have the rules in way that generates a CSS files with url-loader converting all url(...) inside that sass file to a dataURI. so background: url('my-file.svg') would be converted…
Guilherme Lopes
  • 4,688
  • 1
  • 19
  • 42
9
votes
1 answer

How do I add an additional postcss plugin via the new @angular/cli v7 angular.json or custom-webpack.config.js?

@angular/cli@7+ allows a customWebpackConfig to be specified to provide custom webpack configuration, such as: "architect": { "build": { "builder": "@angular-builders/custom-webpack:browser", "options": { …
Michael
  • 91
  • 3
8
votes
2 answers

How to bundle vendor fonts when creating libraries with Angular cli

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 ng-packagr. Due to ng-packagr not supporting scss…
mindparse
  • 6,115
  • 27
  • 90
  • 191
8
votes
3 answers

Angular CLI fileReplacements for default/development

I have a rather complex angular.json because I have multiple projects. What I would like to have is separate environment.ts files per project. Replacing the environment file when the build target is production seems to be pretty…
Jacob
  • 362
  • 1
  • 3
  • 13
6
votes
1 answer

Angular CLI 7 Webpack Bundle Analyzer modules concatenated

I'm running Webpack Bundle Analyzer for my Angular 7 app and it's producing output like this: This is a known caveat when webpack.optimize.ModuleConcatenationPlugin is used per the troubleshooting section found here. They have a recommendation for…
Tom Schreck
  • 5,177
  • 12
  • 68
  • 122
6
votes
4 answers

Angular 7: How to access query string in URL from an iframe?

The app under development is hosted within an iframe. I have the following routes configured in my app: const routes: Routes = [ { path: '', pathMatch: 'full', redirectTo: 'list' }, { path: 'list', component:…
user2439903
  • 1,277
  • 2
  • 34
  • 68
5
votes
3 answers

Repository is not clean

Updating angular 7 to angular 8, I updated successfully upto angular/cli angular/core using the command $ ng update @angular/cli@v8 @angular/core@v8. And i used angular material also, so i want to update material then i update with $ ng update…
Kishore Kumar Burra
  • 315
  • 2
  • 4
  • 13
5
votes
2 answers

Angular - How to exclude a lazy loaded module from prod build?

I have an angular module for demo purposes (DevShowcaseModule). This module should not be included in the production build. In order to hide this demos from the endusers and prevent demo code errors in the production. Environment: Angular Version:…
Webworx23
  • 121
  • 2
  • 9
5
votes
2 answers

how to fix the npm audit report

When I run npm audit command === npm audit security report === `Manual Review Some vulnerabilities require your attention to resolve Visit https://go.npm.me/audit-guide for additional guidance ` High │ Arbitrary File Overwrite …
Abhiz
  • 970
  • 1
  • 16
  • 36
5
votes
1 answer

Set a specific environment for ng e2e tests in angular 7 without serving the app

I recently upgraded my application to angular 7. I am trying to run my ng e2e tests using a specific environment. Also, I do not wish to run a new server every time I run e2e tests for the application. When using angular 5, I used to do it the…
realIsComplex
  • 99
  • 1
  • 10
5
votes
1 answer

Conditional script inclusion depending environment

I would like to know if there is a way to configure the scripts section of the angular.json file depending on the environment. I would like to include a specific script(Myscript.js) only when I'm in the production environment. "scripts": [ …
bAN
  • 13,375
  • 16
  • 60
  • 93
1
2 3 4 5 6 7