angular-cli

Error: Cannot find module '@angular/compiler-cli

前提是你 提交于 2021-02-07 14:30:33
问题 I am getting the below mentioned error when I execute ng s --open command: Cannot find module '@angular/compiler-cli' Error: Cannot find module '@angular/compiler-cli' at Function.Module._resolveFilename (internal/modules/cjs/loader.js:655:15) at Function.Module._load (internal/modules/cjs/loader.js:580:25) at Module.require (internal/modules/cjs/loader.js:711:19) at require (internal/modules/cjs/helpers.js:14:16) at Object. (G:\Front-End\angular\rapydly\node_modules@ngtools\webpack\src

Package '@angular/cli' is not a dependency

久未见 提交于 2021-02-07 04:44:06
问题 I am getting the following error when I try to run the command ng update @angular/cli @angular/core --allow-dirty Repository is not clean. Update changes will be mixed with pre-existing changes. Using package manager: 'npm' Collecting installed dependencies... Found 28 dependencies. Package '@angular/cli' is not a dependency. 回答1: First commit all your changes to the repo and then try following commands. npm i -g @angular/cli@8.0.0 and ng update --all --force Please read this issue on github

Running Angular 5 app inside webworker causes window object to be undefined

老子叫甜甜 提交于 2021-02-07 02:13:29
问题 I am trying to upgrade this (ngx-admin) free Angular template to Angular 5 and then trying to run the whole app inside WebWorker as mentioned in this SO Post. I successfully upgraded the app to Angular 5 and it is working fine but when I try to configure the app to run inside Webworker it gives me following error: The complete code (modified to Angular 5 and webworker) can be found here I tried to add DefinePlugin in my webpack config but no luck. webpack.config.json: new DefinePlugin({

Running Angular 5 app inside webworker causes window object to be undefined

让人想犯罪 __ 提交于 2021-02-07 02:04:49
问题 I am trying to upgrade this (ngx-admin) free Angular template to Angular 5 and then trying to run the whole app inside WebWorker as mentioned in this SO Post. I successfully upgraded the app to Angular 5 and it is working fine but when I try to configure the app to run inside Webworker it gives me following error: The complete code (modified to Angular 5 and webworker) can be found here I tried to add DefinePlugin in my webpack config but no luck. webpack.config.json: new DefinePlugin({

Zsh : command not found : ng on new Mac OS Catalina

自闭症网瘾萝莉.ら 提交于 2021-02-06 10:43:12
问题 I have download the new Mac OS Version Beta of Catalina. Now I should start to use Zsh. But when I want to run a Angular project in Atom, I receveid this message : "The default interactive shell is now zsh. To update your account to use zsh, please run chsh -s /bin/zsh . For more details, please visit https://support.apple.com/kb/HT208050." I'am already using zsh Terminal but he doesn't found the ng commands. 回答1: I also lost access to my commands after moving over to zsh following the

Zsh : command not found : ng on new Mac OS Catalina

混江龙づ霸主 提交于 2021-02-06 10:42:14
问题 I have download the new Mac OS Version Beta of Catalina. Now I should start to use Zsh. But when I want to run a Angular project in Atom, I receveid this message : "The default interactive shell is now zsh. To update your account to use zsh, please run chsh -s /bin/zsh . For more details, please visit https://support.apple.com/kb/HT208050." I'am already using zsh Terminal but he doesn't found the ng commands. 回答1: I also lost access to my commands after moving over to zsh following the

How do I serve assets when I run ng test using latest angular-cli (beta 15 w/webpack)?

孤街醉人 提交于 2021-02-06 10:10:35
问题 When I try and run an ng test, all of my modules and components load correctly, but any of the assets I include in <img> tags do not render because they're not being served in the /assets folder (like they would in a build or during development using ng serve) In addition to this, it would be nice to know how to get the global styles.scss/css file to be included in the test, as I can only get these styles to render if I drop the CSS into a component and disable ViewEncapsulation. I'm on the

How to integrate PurgeCSS with Angular CLI project

╄→尐↘猪︶ㄣ 提交于 2021-02-06 03:52:32
问题 I have an Angular project created with Angular CLI, so I have angular.json file for configuring the build. I wanted to integrate PurgeCSS as it seems to be a great tool to reduce the size of our CSS bundle. On PurgeCSS website, they explain how to integrate with Webpack. I found a tutorial that explains how to add custom webpack integration with Angular CLI. Did anyone have a successful example of PurgeCSS integrated with Angular CLI project ? 回答1: I created this bash script to use PurgeCSS

How to integrate PurgeCSS with Angular CLI project

a 夏天 提交于 2021-02-06 03:52:30
问题 I have an Angular project created with Angular CLI, so I have angular.json file for configuring the build. I wanted to integrate PurgeCSS as it seems to be a great tool to reduce the size of our CSS bundle. On PurgeCSS website, they explain how to integrate with Webpack. I found a tutorial that explains how to add custom webpack integration with Angular CLI. Did anyone have a successful example of PurgeCSS integrated with Angular CLI project ? 回答1: I created this bash script to use PurgeCSS

npm test --codecoverage doesn't generate report

百般思念 提交于 2021-02-05 07:10:45
问题 Have no ideas why when I hit npm test --codecoverage All test is being executed, however I see an empty '/coverage' folder with no single report. I use angular-cli What I'm doing wrong? 回答1: If you have the CLI installed globally, The command is ng test --code-coverage If you want to use the npm scripts , you will need to do npm test -- --code-coverage 回答2: I believe the command is npm test --coverage There is no check on arguments passed, so you can put in anything you like without it