C8Y CLI - No longer works with Angular

What product/components do you use and which version/fix level are you on?

Angular 11 / Angular 8 - https://www.npmjs.com/package/@c8y/cli

Is your question related to the free trial, or to a production (customer) instance?

Production

What are you trying to achieve? Please describe it in detail.

Following this guide verbatim: Development tools - Cumulocity IoT Guides

When trying to run ng serve I get:

[error] WebpackOptionsValidationError: Invalid configuration object. Webpack has been initialised using a configuration object that does not match the API schema.
 - configuration.module.rules[17].type should be one of these:
   "javascript/auto" | "javascript/dynamic" | "javascript/esm" | "json" | "webassembly/experimental"
   -> Module type to use for the module
    at webpack (/home/harrison/barcode-scanner/node_modules/webpack/lib/webpack.js:31:9)
    at createWebpack (/home/harrison/barcode-scanner/node_modules/@angular-devkit/build-webpack/src/webpack-dev-server/index.js:18:74)
    at Object.runWebpackDevServer (/home/harrison/barcode-scanner/node_modules/@angular-devkit/build-webpack/src/webpack-dev-server/index.js:27:12)
    at SwitchMapSubscriber.project (/home/harrison/barcode-scanner/node_modules/@angular-devkit/build-angular/src/dev-server/index.js:162:32)
    at SwitchMapSubscriber._next (/home/harrison/barcode-scanner/node_modules/rxjs/internal/operators/switchMap.js:49:27)
    at SwitchMapSubscriber.Subscriber.next (/home/harrison/barcode-scanner/node_modules/rxjs/internal/Subscriber.js:66:18)
    at /home/harrison/barcode-scanner/node_modules/rxjs/internal/util/subscribeToPromise.js:7:24
    at processTicksAndRejections (internal/process/task_queues.js:95:5)

This is with NodeJS 14, C8Y-CLI (latest) and Angular 11 or Angular 8 (tried both).

Hi Harrison,

it seems like this page of the documentation is outdated.
The latest version of c8ycli (1013.0.297) uses already angular 12.
Please try the following:

npm install -g @angular/cli@v12-lts
ng new my-first-iot-project
cd my-first-iot-project
ng add @c8y/cli@1013.0.297

This topic was automatically closed 180 days after the last reply. New replies are no longer allowed.