angular-cli

“You seem to not be depending on ”@angular/core“.”

谁说胖子不能爱 提交于 2020-05-09 18:57:46
问题 When I try to build my project running the following command: ng build --environment=prod --aot=false --output-path="..." --base-href="..." You seem to not be depending on @angular/core . This is an error, however, I don't understand why because before it worked well. I tried to do this: npm install @angular/core But I get this error : error at Error (native) error { Error: EACCES: permission denied, chown '' error at Error (native) error errno: -13, error code: 'EACCES', error syscall:

“Invalid Host header” when running Angular/cli development server c9.io

99封情书 提交于 2020-05-09 17:56:05
问题 Current command: ng serve --host --public $IP:$PORT Results on my website: Invalid Host header 回答1: The --disable-host-check flag works fine if you need to run from Cloud9. I use the following command: ng serve --open --host $IP --port $PORT --disable-host-check 回答2: You need to specify the host ng serve --port 8080 --host 123.34.56.78 回答3: See this issue Edit the following line in node_modules/webpack-dev-server/lib/Server.js (line 425), change to: return true; I am using cloud9 IDE then run

Cannot find module '@angular-devkit/schematics/tasks'

断了今生、忘了曾经 提交于 2020-05-09 06:34:28
问题 when I try to add @angular/material to my project I get this error. Using Angular Cli: 7.2.1, Node 11.6.0 Cannot find module '@angular-devkit/schematics/tasks' Error: Cannot find module '@angular-devkit/schematics/tasks' at Function.Module._resolveFilename (internal/modules /cjs/loader.js:603:15) at Function.Module._load (internal/modules/cjs/loader.js:529:25) at Module.require (internal/modules/cjs/loader.js:657:17) at require (internal/modules/cjs/helpers.js:22:18) at Object. (/Users

Angular: add custom HTTP response headers to dev `ng serve`

落爺英雄遲暮 提交于 2020-04-30 11:06:53
问题 Is it possible to add a custom HTTP response header to the development server that runs with ng serve ? I'd like to add this custom header specially in the response of the main html file request, although it'd fine if it was added for every resource ( js files, etc.). I found these two recent Angular issues: https://github.com/angular/angular-cli/issues/15095 https://github.com/angular/angular-cli/issues/15729 But it's still unclear to me if it's even possible to do it, and if it's possible

Ionic4 Unknown browser query

南笙酒味 提交于 2020-04-30 05:20:20
问题 I have practised Ionic a lot so these Problems are not new for me but I am unabale to solve this one. I am currently trying to migrate my Ionic3 project to Ionic4. To do this I have created a new Ionic4 tabs project. Every time I try the Ionic serve command I am getting: [ng] An unhandled exception occurred: Unknown browser query basedir=$(dirname "$(echo "$0" | sed -e 's Maybe you are using old Browserslist or made typo in query. [ng] See "C:\Users\Admin\AppData\Local\Temp\ng-9er5Id\angular

Angular CLI 6: Where to put library dependencies

萝らか妹 提交于 2020-04-29 05:40:06
问题 I'm converting a library (ng-app-state) to use the angular cli, now that v6 supports libraries (yay!). After scaffolding and copying in some code, here is my first question: How/where do I add 3rd party dependencies? To package.json , or to projects/ng-app-state/package.json ? 回答1: Turns out the answer is kind of "both". Understanding the answer comes from this: package.json is what will be used during development. You actually install all your libraries here for your own use, including the

Angular CLI 6: Where to put library dependencies

可紊 提交于 2020-04-29 05:37:05
问题 I'm converting a library (ng-app-state) to use the angular cli, now that v6 supports libraries (yay!). After scaffolding and copying in some code, here is my first question: How/where do I add 3rd party dependencies? To package.json , or to projects/ng-app-state/package.json ? 回答1: Turns out the answer is kind of "both". Understanding the answer comes from this: package.json is what will be used during development. You actually install all your libraries here for your own use, including the

What is difference between ng build and ng serve?

北城以北 提交于 2020-04-07 13:46:25
问题 What is the difference between ng build and ng serve? What exactly done or changes happen after ng build and ng serve? 回答1: Update: Read this document https://docs.npmjs.com/misc/scripts#description The ng build is to build artifacts. The ng serve command is to pre-install packages and start the app. 回答2: The ng build command is intentionally for building the apps and deploying the build artifacts. The ng serve command is intentionally for fast, local and iterative developments and also for

Angular/CLI — auto reload doesn't happen

百般思念 提交于 2020-04-07 12:09:35
问题 I recently started working with Angular/CLI tool, I'm facing a problem while executing the file, that is when I run ng serve then this command helps us in auto reloading the site when any changes are made in the source file but in my system it is not happening (i.e. site is not auto reloading and when I forcely reload the site then also it is not getting updated as per changes made in the source file). The site is getting updated only when I terminate the "ng serve" command and again run the

Angular/CLI — auto reload doesn't happen

不羁的心 提交于 2020-04-07 12:09:29
问题 I recently started working with Angular/CLI tool, I'm facing a problem while executing the file, that is when I run ng serve then this command helps us in auto reloading the site when any changes are made in the source file but in my system it is not happening (i.e. site is not auto reloading and when I forcely reload the site then also it is not getting updated as per changes made in the source file). The site is getting updated only when I terminate the "ng serve" command and again run the