How do I add C8Y CLI to an Angular Project?

I want to build an Angular application with Angular’s own CLI and then add the latest version of the Cumulocity CLI via the ng add @c8y/cli command.

I have tried downgrading my NodeJs version from 16 to 14 to use the latest version of c8y/cli 1016.0.324 , but when I do so I get an error stating that Angular CLI requires a minimum of v16.13

Unfortunately, the official guide has been outdated for while and the latest related topic on the forum that I could find only dates back to October 2022.

What versions of NodeJs, NPM, and Angular do I need in order to run the latest C8Y CLI in my application?

Hi Lucas,

the combination of:

  • node 14.21.3
  • angular 14
  • @c8y/cli 1016.0.324

should work and I tested it on my end:

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

Newer documentation regarding the WebSDK (at least compared to the linked one in 1004.6.0) can be found here: Development tools - Cumulocity IoT Guides

Regards,
Tristan

Thanks! It worked.

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