Package "single-spa-angular" was found but does not support schematics

166 Views Asked by At

I am trying to convert existing angular app to single spa microfrontend but I am getting the following error

"Package "single-spa-angular" was found but does not support schematics."

I am running the following command: ng add single-spa-angular

Following is the package.json file for angular-app (a microfrontend)

{
  "name": "angular-app",
  "version": "0.0.0",
  "scripts": {
    "ng": "ng",
    "start": "ng serve",
    "build": "ng build",
    "watch": "ng build --watch --configuration development",
    "test": "ng test"
  },
  "private": true,
  "dependencies": {
    "@angular/animations": "^14.2.0",
    "@angular/common": "^14.2.0",
    "@angular/compiler": "^14.2.0",
    "@angular/core": "^14.2.0",
    "@angular/forms": "^14.2.0",
    "@angular/platform-browser": "^14.2.0",
    "@angular/platform-browser-dynamic": "^14.2.0",
    "@angular/router": "^14.2.0",
    "rxjs": "~7.5.0",
    "single-spa-angular": "^2.0.0",
    "tslib": "^2.3.0",
    "zone.js": "~0.11.4"
  },
  "devDependencies": {
    "@angular-devkit/build-angular": "^14.2.11",
    "@angular/cli": "~14.2.11",
    "@angular/compiler-cli": "^14.2.0",
    "@types/jasmine": "~4.0.0",
    "jasmine-core": "~4.3.0",
    "karma": "~6.4.0",
    "karma-chrome-launcher": "~3.1.0",
    "karma-coverage": "~2.2.0",
    "karma-jasmine": "~5.1.0",
    "karma-jasmine-html-reporter": "~2.0.0",
    "typescript": "~4.7.2"
  }
}

Node version: 16.19.1

1

There are 1 best solutions below

0
Ajmal On

For angular 14, the version of single-spa-angular should be 7. But as per your package.json the single-spa-angular version is 2. As a result, schematics didn't run.

"single-spa-angular": "^2.0.0"

Run ng add single-spa-angular@7 to update single-spa-angular to the correct version.