angular-cli-v7

cannot find module in angular Lazy Loading

我与影子孤独终老i 提交于 2021-01-02 05:50:52
问题 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: 7.2.15 however it is coming with a very weird issue when trying to lazy load another module, I keep getting this error Error: Cannot find module "app/website/site.module" Here is my project structure and app-routing.module.ts const routes: Routes = [ {

angular 7 cli generate each service, pipe,etc in their own directory

荒凉一梦 提交于 2020-01-16 17:34:26
问题 With early versions of the Angular Cli when I run ng g service services/MyService it created: services/my-service/my-service.service.ts services/my-service/my-service.service.spec.ts But now it creates services/my-service.service.ts services/my-service.service.spec.ts Is there a way to go back to the other behavior without write a verbose ng g service services/my-service/MyService ? I had not found anything related but maybe I am not using the correct keywords. 回答1: While you can pass --flat

Angular CLI fileReplacements for default/development

我与影子孤独终老i 提交于 2019-12-24 07:29:16
问题 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 straightforward: "configurations": { "production": { "fileReplacements": [ { "replace": "src/environments/environment.ts", "with": "src/private-label/redacted/environments/environment.prod.ts" } ], } } What I'm looking for is a way to do the same with the default

how to fix the npm audit report

青春壹個敷衍的年華 提交于 2019-12-22 11:21:49
问题 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 Package │ tar Patched in │ >=4.4.2 Dependency of │ @angular-devkit/build-angular [dev] Path │ @angular-devkit/build-angular > node-sass > node-gyp >tar More info │ https://nodesecurity.io/advisories/803 its saying found 1 high severity vulnerability in 42611 scanned

Angular build for production fails

半腔热情 提交于 2019-12-22 01:43:18
问题 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} runtime.1eee2a92f0ed121267d0.js (runtime) 2.22 kB [entry] [rendered] chunk {1} 1.71c6b320e46d84e7f880.js () 88.8 kB [rendered] chunk {2} main.058aa675d38205a01c2e.js (main) 1.65 MB [initial] [rendered] chunk {3} polyfills.6226af78bf8dfb509e3e.js (polyfills) 61.7 kB

Angular app installing Error: Unexpected end of JSON input while parsing near '…//registry.npmjs.org/'

青春壹個敷衍的年華 提交于 2019-12-11 06:02:08
问题 I am very new to Angular. I have installed the Angular by using the command: npm install -g @angular/cli When I check the version of Angular it shows: After on, I installed an Angular application by using: ng new newApp I have got an error during app installation: Unexpected end of JSON input while parsing near '...//registry.npmjs.org/' Here is the image of what I have done: You can find log content through this link: https://drive.google.com/file/d/11MEWOcSaU4c-1879LuijRiXRvCu-cAIz/view?usp

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

时间秒杀一切 提交于 2019-12-09 14:09:32
问题 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 caused the problem. Unfortunately I couldn't identify the problem. Here's the log: ERROR in : TypeError: Cannot read property 'kind' of undefined at getAssignmentTargetKind (E:\McClient\node_modules\typescript\lib\typescript.js:10049:28) at Object

ng upgrade command fails for upgrading cli from v7 to v8

我的梦境 提交于 2019-12-07 08:45:48
问题 The ng upgrade command for updating cli version from a v7 project to v8 fails. Manually trying to upgrade cli first also fails. ng update @angular/cli Your global Angular CLI version (8.0.1) is greater than your local version (7.3.9). The local Angular CLI version is used. Package "@angular/compiler-cli" has an incompatible peer dependency to " typescript " (requires ">=3.1.1 <3.3", would install "3.4.5") . Incompatible peer dependencies found. See above. 回答1: try upgrading all packages using

ng upgrade command fails for upgrading cli from v7 to v8

浪尽此生 提交于 2019-12-05 18:08:13
The ng upgrade command for updating cli version from a v7 project to v8 fails. Manually trying to upgrade cli first also fails. ng update @angular/cli Your global Angular CLI version (8.0.1) is greater than your local version (7.3.9). The local Angular CLI version is used. Package "@angular/compiler-cli" has an incompatible peer dependency to " typescript " (requires ">=3.1.1 <3.3", would install "3.4.5") . Incompatible peer dependencies found. See above. try upgrading all packages using ng update --all --force if this doesn't work then try upgrading core and CLI ng update @angular/core

Angular build for production fails

强颜欢笑 提交于 2019-12-04 20:59:27
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} runtime.1eee2a92f0ed121267d0.js (runtime) 2.22 kB [entry] [rendered] chunk {1} 1.71c6b320e46d84e7f880.js () 88.8 kB [rendered] chunk {2} main.058aa675d38205a01c2e.js (main) 1.65 MB [initial] [rendered] chunk {3} polyfills.6226af78bf8dfb509e3e.js (polyfills) 61.7 kB [initial] [rendered] chunk {4} styles.dec6a5db702d518085c9.css (styles) 61.2 kB [initial] [rendered]