Category : angular-devkit

I work with an migration Angular project and received the following errors,after running ng build Could not find API compiler-cli, function __NGTOOLS_PRIVATE_API_2 Error: Could not find API compiler-cli, function __NGTOOLS_PRIVATE_API_2 at _error (/home/administrator/angular 6/angular-phonecat-hybrid-master/node_modules/@angular-devkit/build-angular/node_modules/@ngtools/webpack/src/ngtools_api.js:8:11) at getApiMember (/home/administrator/angular 6/angular-phonecat-hybrid-master/node_modules/@angular-devkit/build-angular/node_modules/@ngtools/webpack/src/ngtools_api.js:11:32) at Object. (/home/administrator/angular 6/angular-phonecat-hybrid-master/node_modules/@angular-devkit/build-angular/node_modules/@ngtools/webpack/src/ngtools_api.js:51:35) at Module._compile (internal/modules/cjs/loader.js:1068:30) at Object.Module._extensions..js (internal/modules/cjs/loader.js:1097:10) at Module.load (internal/modules/cjs/loader.js:933:32) at Function.Module._load (internal/modules/cjs/loader.js:774:14) at ..

Read more

I work with an Angular migration project and received the following errors,after running ng build Could not find API compiler-cli, function __NGTOOLS_PRIVATE_API_2 Error: Could not find API compiler-cli, function __NGTOOLS_PRIVATE_API_2 at _error (/home/administrator/angular 6/angular-phonecat-hybrid-master/node_modules/@angular-devkit/build-angular/node_modules/@ngtools/webpack/src/ngtools_api.js:8:11) at getApiMember (/home/administrator/angular 6/angular-phonecat-hybrid-master/node_modules/@angular-devkit/build-angular/node_modules/@ngtools/webpack/src/ngtools_api.js:11:32) at Object.<anonymous> (/home/administrator/angular 6/angular-phonecat-hybrid-master/node_modules/@angular-devkit/build-angular/node_modules/@ngtools/webpack/src/ngtools_api.js:51:35) at Module._compile (internal/modules/cjs/loader.js:1068:30) at Object.Module._extensions..js (internal/modules/cjs/loader.js:1097:10) at Module.load (internal/modules/cjs/loader.js:933:32) at Function.Module._load (internal/modules/cjs/loader.js:774:14) at ..

Read more

After upgrading to Angular 12 my Content Security Policy blocks styles from loading correctly. The Angular 12 devkit seems to add a new inline event handler to the CSS bundle reference in index.html, example below. <link rel="stylesheet" href="styles.5951e4ca367b697db091.css" crossorigin="anonymous" integrity="sha384-2031E8+oC87S0N7NzRGcF8fqx777KEJOgQ3KcUN4aX6xsR3BVaV5sh4fibR5joOc" media="print" onload="this.media=’all’"> Error Refused to execute inline event handler because it violates the following Content ..

Read more

I am trying to use Module Federation Plugin in my angular project, but I am getting this error – [error] TypeError: Cannot read property ‘includes’ of undefined at ModuleFederationPlugin.apply (C:UsersHPtest-appnode_moduleswebpacklibcontainerModuleFederationPlugin.js:45:49) at Object.webpack [as webpackFactory] (C:[email protected]_moduleswebpacklibwebpack.js:51:13) at createWebpack (C:[email protected]k-dev-serverindex.js:21:36) at Object.runWebpackDevServer (C:[email protected]k-dev-serverindex.js:47:12) at SwitchMapSubscriber.project (C:[email protected]rverindex.js:221:32) at SwitchMapSubscriber._next (C:[email protected]_modulesrxjsinternaloperatorsswitchMap.js:47:27) at SwitchMapSubscriber.Subscriber.next (C:[email protected]_modulesrxjsinternalSubscriber.js:66:18) at C:[email protected]_modulesrxjsinternalutilsubscribeToPromise.js:7:24 at processTicksAndRejections (internal/process/task_queues.js:93:5) ..

Read more

I am trying implement AOT in my angular project which does not have cli support. I searched a bit and found @ngtools/webpack is the way to go. my angular is 11.0.4, Typescript is 4.0.5, webpack – 4.44.2. I installed @ngtools/webpack – 11.0.4. my tsconfig.aot.json – { "angularCompilerOptions": { "skipMetadataEmit" : true, "trace": true, "genDir": "aot/" ..

Read more

I’m trying to build my Angular app, i am using live-chat plugin for angular, but i receive this error: ERROR in ./node_modules/@livechat/angular-widget/fesm2015/livechat-angular-widget.js Module build failed (from ./node_modules/@angular-devkit/build-optimizer/src/build-optimizer/webpack-loader.js): TypeError: Cannot read property ‘kind’ of undefined Do I need to update something? With ng serve it’s working pretty good. Angular CLI: global 9.1.7, local 7.3.10 Node: 10.15.3 ..

Read more

I’m trying to install mqtt in Angular project using npm i ngx-mqtt but I got below error related to angular-devkit. I’m already using "@angular-devkit/build-angular": "^0.803.24" and it is installed and I’m using Angular 8. [Error: ENOENT: no such file or directory, open ‘**PATH**[email protected].js’] { errno: -4058, code: ‘ENOENT’, syscall: ‘open’, path: ‘[email protected]wser.js’ } **PATH**node_modulesngx-mqttpostinstall.js:12 throw ..

Read more