angular-cli

Angular6 Error: Uncaught (in promise): Error: StaticInjectorError(o)[e -> e]

偶尔善良 提交于 2020-01-24 00:13:10
问题 I have Angular 6.0.3 in Production by using ng build --prod in command line project get build success but while running http-server on dist getting the following Exception in browser console ERROR Error: Uncaught (in promise): Error: StaticInjectorError(o)[e -> e]: StaticInjectorError(Platform: core)[e -> e]: NullInjectorError: No provider for e! Error: StaticInjectorError(o)[e -> e]: StaticInjectorError(Platform: core)[e -> e]: NullInjectorError: No provider for e! at e.get (main

Angular Module vs. Library

人走茶凉 提交于 2020-01-23 12:06:32
问题 So great, the Angular has released version 6 and the CLI provides an option to generate libraries - something that they call a "highly anticipated feature". Now, coming from a business perspective, I am wondering: why you would actually need this, why inside of an existing project and not a separate which you can install as usual via npm... and if you want this inside your project, why not use a module for that. So I get it, publish something on npmjs and hope the whole world and future

Angular cli build prod: TypeError: Cannot read property 'kind' of undefined

家住魔仙堡 提交于 2020-01-23 06:56:07
问题 I try to build project with Angular CLI ng build --prod and I get this error: ERROR in TypeError: Cannot read property 'kind' of undefined if I build with not --prod I do not get any error Full error: ERROR in TypeError: Cannot read property 'kind' of undefined at isParameterPropertyDeclaration (node_modules/typescript/lib/typescript.js:13445:88) at Object.filter (node_modules/typescript/lib/typescript.js:469:31) at transformClassMembers (node_modules/typescript/lib/typescript.js:70813:20) at

Angular cli build prod: TypeError: Cannot read property 'kind' of undefined

一个人想着一个人 提交于 2020-01-23 06:56:06
问题 I try to build project with Angular CLI ng build --prod and I get this error: ERROR in TypeError: Cannot read property 'kind' of undefined if I build with not --prod I do not get any error Full error: ERROR in TypeError: Cannot read property 'kind' of undefined at isParameterPropertyDeclaration (node_modules/typescript/lib/typescript.js:13445:88) at Object.filter (node_modules/typescript/lib/typescript.js:469:31) at transformClassMembers (node_modules/typescript/lib/typescript.js:70813:20) at

Can angular cli use flag icon css?

别等时光非礼了梦想. 提交于 2020-01-23 06:34:29
问题 I am beginner in angular cli and I was wondering: can I use this https://github.com/lipis/flag-icon-css in package.json because when there is an update it's more easy to update automatically and I don't have to do it manually. And is it a problem that Flag icon are SCSS and I use SASS in my angular 2 project? 回答1: Yes it can do, Using the package from node_modules works just fine. You'll just have to override all paths. I've got this in my style.scss. $flag-icon-css-path: '~flag-icon-css

Can angular cli use flag icon css?

扶醉桌前 提交于 2020-01-23 06:34:12
问题 I am beginner in angular cli and I was wondering: can I use this https://github.com/lipis/flag-icon-css in package.json because when there is an update it's more easy to update automatically and I don't have to do it manually. And is it a problem that Flag icon are SCSS and I use SASS in my angular 2 project? 回答1: Yes it can do, Using the package from node_modules works just fine. You'll just have to override all paths. I've got this in my style.scss. $flag-icon-css-path: '~flag-icon-css

Can angular cli use flag icon css?

风流意气都作罢 提交于 2020-01-23 06:34:05
问题 I am beginner in angular cli and I was wondering: can I use this https://github.com/lipis/flag-icon-css in package.json because when there is an update it's more easy to update automatically and I don't have to do it manually. And is it a problem that Flag icon are SCSS and I use SASS in my angular 2 project? 回答1: Yes it can do, Using the package from node_modules works just fine. You'll just have to override all paths. I've got this in my style.scss. $flag-icon-css-path: '~flag-icon-css

Serving and testing a bundle after ng build

寵の児 提交于 2020-01-22 13:45:28
问题 After I build a bundle with ng build --prod --aot I would like to quickly serve it locally. Is there a way to quickly serve the /dist directory locally using @angular/cli? I tried to cd dist && ng serve but the dist disappears when the ng serve command is run. 回答1: http-server is what I use, and it works well. Install: npm install -g http-server cd into your dist folder, type http-server , then enter. Or, just do http-server .\dist at the command line after your application build is

Angular CLI - Typescript throws: Cannot read property 'length' of undefined

旧巷老猫 提交于 2020-01-22 10:46:13
问题 I run in angular 4 project with ng serve and i get error Cannot read property 'length' of undefined but I don't have any property length in my project.. the full error Your global Angular CLI version (1.2.1) is greater than your local version (1.1.3). The local Angular CLI version is used. To disable this warning use "ng set --global warnings.versionMismatch=false". Cannot read property 'length' of undefined TypeError: Cannot read property 'length' of undefined at createSourceFile (E:

Error: Please, upgrade your dependencies to the actual version of core-js@3

不羁岁月 提交于 2020-01-21 07:29:28
问题 I'm trying to run npm start but giving me error "An unhandled exception occurred: Could not find module "@angular-devkit/build-angular" I also tried to install it by using npm install @angular-devkit/build-angular but still getting me an error. Error "npm WARN deprecated core-js@2.6.11: core-js@<3 is no longer maintained and not recommended for usage due to the number of issues. Please, upgrade your dependencies to the actual version of core-js@3." How can I upgrade my dependencies? 回答1: You