I am currently trying to create my own extension for cumulocity with the new client version 1022.3.2.
Here are the individual steps to reproduce the error:
npx @angular/cli@v19-lts new --style=less
Name of the project: test-plugin3.- go to the test-plugin folder
ng add @c8y/websdknpm run start -- -u https://[subtenant].emea.cumulocity.com- Call up http://localhost:4200/apps/test-plugin
After calling the link, the browser jumps to this url “http://localhost:4200/apps/public/login/index.html” and a 404 occurs.
What can I do so that I can develop on my local machine again?
If more finos are needed, please write.
Here are the log outputs of the individual steps:
Summary
- angular
npx @angular/cli@v19-lts new --style=less
✔ What name would you like to use for the new workspace and initial project? test-plugin
✔ Do you want to enable Server-Side Rendering (SSR) and Static Site Generation (SSG/Prerendering)? No
CREATE test-plugin/README.md (1474 bytes)
CREATE test-plugin/.editorconfig (314 bytes)
CREATE test-plugin/.gitignore (587 bytes)
CREATE test-plugin/angular.json (2784 bytes)
CREATE test-plugin/package.json (1006 bytes)
CREATE test-plugin/tsconfig.json (915 bytes)
CREATE test-plugin/tsconfig.app.json (424 bytes)
CREATE test-plugin/tsconfig.spec.json (434 bytes)
CREATE test-plugin/.vscode/extensions.json (130 bytes)
CREATE test-plugin/.vscode/launch.json (470 bytes)
CREATE test-plugin/.vscode/tasks.json (938 bytes)
CREATE test-plugin/src/main.ts (250 bytes)
CREATE test-plugin/src/index.html (296 bytes)
CREATE test-plugin/src/styles.less (80 bytes)
CREATE test-plugin/src/app/app.component.less (0 bytes)
CREATE test-plugin/src/app/app.component.html (19903 bytes)
CREATE test-plugin/src/app/app.component.spec.ts (931 bytes)
CREATE test-plugin/src/app/app.component.ts (288 bytes)
CREATE test-plugin/src/app/app.config.ts (310 bytes)
CREATE test-plugin/src/app/app.routes.ts (77 bytes)
CREATE test-plugin/public/favicon.ico (15086 bytes)
✔ Packages installed successfully.
Successfully initialized git.
- websdk
ng add @c8y/websdk
✔ Determining Package Manager
› Using package manager: npm
✔ Searching for compatible package version
› Found compatible package version: @c8y/websdk@1022.3.2.
✔ Loading package information from registry
✔ Confirming installation
✔ Installing package
✔ Which base project do you want to scaffold from? sample-plugin
✔ Which base version do you want to scaffold from? 1022.4.7
UPDATE package.json (1091 bytes)
✔ Packages installed successfully.
Adding Cumulocity IoT files (@c8y/sample-plugin) to the application (test-plugin)...
Updating angular.json...
Updating tsconfig.app.json
Updating tsconfig.json
Updating index.html...
Removing files...
Removing app/app.component...
Removing app/app.routes...
Installing dependencies...
DELETE src/app/app.component.html
DELETE src/app/app.component.less
DELETE src/app/app.component.spec.ts
DELETE src/app/app.component.ts
DELETE node_modules/@schematics/angular/application/files/common-files/src/app/app.component.html.template
DELETE node_modules/@schematics/angular/application/files/module-files/src/app/app.component.spec.ts.template
DELETE node_modules/@schematics/angular/application/files/module-files/src/app/app.component.ts.template
DELETE node_modules/@schematics/angular/application/files/standalone-files/src/app/app.component.spec.ts.template
DELETE node_modules/@schematics/angular/application/files/standalone-files/src/app/app.component.ts.template
DELETE src/app/app.routes.ts
DELETE node_modules/@schematics/angular/application/files/standalone-files/src/app/app.routes.ts.template
DELETE node_modules/@schematics/angular/server/files/application-builder/ngmodule-src/app/app.routes.server.ts.template
DELETE node_modules/@schematics/angular/server/files/application-builder/standalone-src/app/app.routes.server.ts.template
CREATE .browserslistrc (601 bytes)
CREATE CHANGELOG.md (283 bytes)
CREATE cumulocity.config.ts (1813 bytes)
CREATE src/bootstrap.ts (655 bytes)
CREATE src/i18n.ts (365 bytes)
CREATE src/polyfills.ts (1514 bytes)
CREATE src/app/README.md (857 bytes)
CREATE src/app/index.ts (1596 bytes)
CREATE src/app/sample-plugin.model.ts (220 bytes)
CREATE src/app/view/sample-view.component.html (1495 bytes)
CREATE src/app/view/sample-view.component.ts (4301 bytes)
CREATE src/app/widget/sample-widget-config.component.ts (1746 bytes)
CREATE src/app/widget/sample-widget.component.css (52 bytes)
CREATE src/app/widget/sample-widget.component.ts (664 bytes)
CREATE src/assets/assets.ts (553 bytes)
CREATE src/assets/example.css (409 bytes)
CREATE src/assets/index.d.ts (220 bytes)
CREATE src/assets/sample-plugin-pr.png (13733 bytes)
CREATE src/locales/de.po (268 bytes)
UPDATE README.md (1784 bytes)
UPDATE tsconfig.app.json (246 bytes)
UPDATE public/favicon.ico (1309 bytes)
UPDATE src/main.ts (508 bytes)
UPDATE src/app/app.config.ts (551 bytes)
UPDATE angular.json (3514 bytes)
UPDATE tsconfig.json (707 bytes)
UPDATE src/index.html (3165 bytes)
UPDATE package.json (1265 bytes)
✔ Packages installed successfully.
- run
npm run start -- -u https://[subtenant].emea.cumulocity.com
> test-plugin@0.0.0 start
> ng serve -u https://[subtenant].emea.cumulocity.com
✔ Browser application bundle generation complete.
assets by path *.js 16.6 MiB
assets by chunk 11.3 MiB (id hint: default) 59 assets
+ 105 assets
assets by chunk 1.9 MiB (auxiliary name: styles) 55 assets
assets by path c8y-style-assets/ 1.97 MiB 49 assets
assets by path monaco-editor/*.js 22.8 MiB
asset monaco-editor/ts.worker.2e16d925ccdfc71206072f479609e314.js 12.4 MiB [emitted] [big] 1 related asset
+ 4 assets
assets by path *.md 2.02 KiB
asset README.md 1.74 KiB [emitted] [from: README.md] [copied]
asset CHANGELOG.md 283 bytes [emitted] [from: CHANGELOG.md] [copied]
assets by path *.json 1.27 KiB
asset cumulocity.json 1.21 KiB [emitted]
asset de.json 64 bytes [emitted]
+ 6 assets
Entrypoint test-plugin 208 KiB (301 KiB) = remoteEntry.js 1 auxiliary asset
Entrypoint main 210 KiB (303 KiB) = main.js 1 auxiliary asset
Entrypoint styles [big] 2.11 MiB (6.11 MiB) = styles.css 1.91 MiB styles.js 206 KiB 57 auxiliary assets
orphan modules 6.61 MiB (javascript) 2.72 KiB (runtime) [orphan] 493 modules
runtime modules 225 KiB 64 modules
javascript modules 12.1 MiB 1063 modules
provide-module modules 3.32 KiB 81 modules
consume-shared-module modules 3.32 KiB 81 modules
css modules 1.9 MiB
modules by path ./node_modules/@fontsource/public-sans/*.css 6.62 KiB 5 modules
css ./node_modules/css-loader/dist/cjs.js??ruleSet[1].rules[14].rules[0].oneOf[0].use[1]!./node_modules/postcss-loader/dist/cjs.js??ruleSet[1].rules[14].rules[0].oneOf[0].use[2]!./node_modules/less-loader/dist/cjs.js??ruleSet[1].rules[14].rules[1].use[0]!./node_modules/@c8y/style/main.less?ngGlobalStyle 1.9 MiB [built] [code generated]
css ./node_modules/css-loader/dist/cjs.js??ruleSet[1].rules[14].rules[0].oneOf[0].use[1]!./node_modules/postcss-loader/dist/cjs.js??ruleSet[1].rules[14].rules[0].oneOf[0].use[2]!./node_modules/less-loader/dist/cjs.js??ruleSet[1].rules[14].rules[1].use[0]!./src/styles.less?ngGlobalStyle 80 bytes [built] [code generated]
asset modules 13.4 KiB (asset) 1.51 KiB (javascript)
./src/assets/sample-plugin-pr.png 13.4 KiB (asset) 42 bytes (javascript) [built] [code generated]
./src/app/view/sample-view.component.html?ngResource 1.47 KiB [built] [code generated]
./node_modules/mime-db/db.json 143 KiB [built] [code generated]
WARNING in /home/********/src/tc8y/extensions/test-plugin/node_modules/@c8y/bootstrap/dist/resolvers/options-resolver.js depends on 'lodash'. CommonJS or AMD dependencies can cause optimization bailouts.
For more info see: https://angular.dev/tools/cli/build#configuring-commonjs-dependencies
webpack 5.98.0 compiled with 1 warning in 107486 ms
** Angular Live Development Server is listening on localhost:4200, open your browser on http://localhost:4200/apps/test-plugin **
✔ Compiled successfully.
✅ ****** c8y build successfully ******
💻 Dev server running: http://localhost:4200/apps/test-plugin
👉 Proxy pointing to: https://[subtenant].emea.cumulocity.com
⌛ Build duration: 111301 ms
✅ ***** -------------------------- *****