0

So I have created a Web SDK project using Angular cli and added the c8ycli to it. When starting the project using c8ycli server -u http://mytenanturl.com all I see is an endless spinner. Could anyone point what am I doing wrong here ??

Here is the console error:

Uncaught (in promise) Error: Can't resolve all parameters for ApplicationModule: (?).
    at syntaxError (webpack-internal:///./node_modules/@angular/compiler/fesm5/compiler.js:2703)
    at CompileMetadataResolver._getDependenciesMetadata (webpack-internal:///./node_modules/@angular/compiler/fesm5/compiler.js:21859)
    at CompileMetadataResolver._getTypeMetadata (webpack-internal:///./node_modules/@angular/compiler/fesm5/compiler.js:21751)
    at CompileMetadataResolver.getNgModuleMetadata (webpack-internal:///./node_modules/@angular/compiler/fesm5/compiler.js:21619)
    at CompileMetadataResolver.getNgModuleSummary (webpack-internal:///./node_modules/@angular/compiler/fesm5/compiler.js:21429)
    at eval (webpack-internal:///./node_modules/@angular/compiler/fesm5/compiler.js:21543)
    at Array.forEach (<anonymous>)
    at CompileMetadataResolver.getNgModuleMetadata (webpack-internal:///./node_modules/@angular/compiler/fesm5/compiler.js:21531)
    at CompileMetadataResolver.getNgModuleSummary (webpack-internal:///./node_modules/@angular/compiler/fesm5/compiler.js:21429)
    at eval (webpack-internal:///./node_modules/@angular/compiler/fesm5/compiler.js:21543)
Jish Nair
  • 65
  • 1
  • 9

1 Answers1

1

I hope you know that this "mytenanturl.com" needs to be change by your tenant real url like "subtenant.tenant.com" :)

In the package.json we will find this line

"start": "c8ycli server" 

Change this line by

"start": "c8ycli server -u http://mytenanturl.com"

if you already did that, use this command to install dependencies

npm install 

and after that don't use c8ycli server -u http://mytenanturl.com, use

npm start 

to run the project.

UPDATED:

Do not use the Angular cli to create the project use the c8ycli :

  1. c8ycli new test cockpit
  2. cd test
  3. npm install
  4. edit package.json
  5. npm start
Jorge
  • 238
  • 1
  • 10
  • Yes, I used the correct tenant url, and also tried changing the start script in package.json. But it still doesn't work. My issue is if I create an app with c8cli it works, but if I create an app with Angular cli and add the c8cli to it, then it doesn't work. I have update the question with error log. – Jish Nair Aug 03 '20 at 15:53
  • @JishNair I see now. There is a special reason to avoid the c8ycli ? – Jorge Aug 03 '20 at 16:01
  • Well, the _generate/ add_ commands of ng cli are missing in c8ycli. – Jish Nair Aug 03 '20 at 17:05
  • @JishNair Did you try this guide https://cumulocity.com/guides/web/angular/#angularcli ? :) – Jorge Aug 03 '20 at 17:20