Data path "" must have required property 'port'

When executing ng add @angular-architects/module-federation --project=cLogin
Its not executed successfully with an error of

Skipping installation: Package already installed
Schematic input does not validate against the Schema: {“project”:“cLogin”}
Errors:

Data path “” must have required property ‘port’.

Hi @bkm,

Could you check the cLogin entry in angular.json

Under cLogin > serve entry you should have an entry like the following. Please make sure that one has the port set

          "options": {
            "extraWebpackConfig": "extensions/my-ext/app/webpack.config.js",
            "port": 3333
          }

Hope this helps

Hi @clemente.raposo
I cant find that entry. Here is my full cLogin entry in angular.json

"cLogin": {
  "projectType": "application",
  "schematics": {
    "@schematics/angular:component": {
      "style": "scss"
    },
    "@schematics/angular:application": {
      "strict": true
    }
  },
  "root": "extensions/c-login/app",
  "sourceRoot": "extensions/c-login/app/src",
  "prefix": "app",
  "architect": {
    "build": {
      "builder": "@angular-devkit/build-angular:browser",
      "options": {
        "namedChunks": true,
        "sourceMap": true,
        "aot": true,
        "outputPath": "public/extensions/c-login",
        "index": "extensions/c-login/app/src/index.html",
        "main": "extensions/c-login/app/src/main.ts",
        "polyfills": "extensions/c-login/app/src/polyfills.ts",
        "tsConfig": "extensions/c-login/app/tsconfig.app.json",
        "inlineStyleLanguage": "scss",
        "assets": [
          "extensions/c-login/app/src/favicon.ico",
          "extensions/c-login/app/src/assets"
        ],
        "styles": [
          "extensions/c-login/app/src/styles.scss"
        ],
        "scripts": []
      },
      "configurations": {
        "production": {
          "optimization": true,
          "outputHashing": "all",
          "sourceMap": false,
          "namedChunks": true,
          "extractLicenses": true,
          "vendorChunk": false,
          "buildOptimizer": true,
          "budgets": [
            {
              "type": "initial",
              "maximumWarning": "2mb",
              "maximumError": "5mb"
            },
            {
              "type": "anyComponentStyle",
              "maximumWarning": "6kb",
              "maximumError": "10kb"
            }
          ],
          "fileReplacements": [
            {
              "replace": "extensions/c-login/app/src/environments/environment.ts",
              "with": "extensions/c-login/app/src/environments/environment.prod.ts"
            }
          ],

          "outputHashing": "all"
        },
        "development": {
          "buildOptimizer": false,
          "optimization": false,
          "vendorChunk": true,
          "extractLicenses": false,
          "sourceMap": true,
          "namedChunks": true
        }
      },
      "defaultConfiguration": "production"
    },
    "serve": {
      "builder": "@angular-devkit/build-angular:dev-server",
      "configurations": {
        "production": {
          "browserTarget": "cLogin:build:production"
        },
        "development": {
          "browserTarget": "cLogin:build:development"
        }
      },
      "defaultConfiguration": "development"
    },
    "extract-i18n": {
      "builder": "@angular-devkit/build-angular:extract-i18n",
      "options": {
        "browserTarget": "cLogin:build"
      }
    },
    "test": {
      "builder": "@angular-devkit/build-angular:karma",
      "options": {
        "main": "extensions/c-login/app/src/test.ts",
        "polyfills": "extensions/c-login/app/src/polyfills.ts",
        "tsConfig": "extensions/c-login/app/tsconfig.spec.json",
        "karmaConfig": "extensions/c-login/app/karma.conf.js",
        "inlineStyleLanguage": "scss",
        "assets": [
          "extensions/c-login/app/src/favicon.ico",
          "extensions/c-login/app/src/assets"
        ],
        "styles": [
          "extensions/c-login/app/src/styles.scss"
        ],
        "scripts": []
      }
    }
  }
}

Hi @bkm,

Sorry for the delay in replying.

Hmm… that is strange. We could try to add it manually. Though I’m just concerned if anything else is missing.

Could check which angular version you have installed please?

Also what commands did you run before that?

Thank you

Hi @clemente.raposo

The webconfig in the extension folder is missing.

This is the command I executed before the federation command
ng g app myExt --projectRoot=extensions/my-ext/app --routing=false --style=scss

Angular CLI: 13.1.2

Hi @bkm,

Sorry for the delay in replying.

Hm… its a bit strange. We’ve tested with angular 12, we haven’t upgraded to angular 13. That may be the issue.

I see that the compatibility matrix says 12+. I’ll fix that.

Hi @clemente.raposo

Downgraded to 12.1.0 and the results still the same