Angular Universal does not add the necessary files

Discussão em 'Angular' iniciado por Dominik Modrzejewski, Novembro 24, 2024.

  1. I try to use the command ng add @nguniversal/express-engine, but I only get this message:

    Skipping installation: Package already installed NOT SUPPORTED: keyword “id”, use “$id” for schema ID

    and no files that should add like server.ts are not adding.

    I am uploading the current package.json:

    {
    "name": "respondo-chat",
    "version": "0.0.0",
    "scripts": {
    "ng": "ng",
    "start": "ng serve",
    "build": "ng build",
    "test": "ng test",
    "lint": "ng lint",
    "e2e": "ng e2e",
    "dist": "http-server ./www/",
    "build:staging": "ng build --configuration=staging"
    },
    "private": true,
    "dependencies": {
    "@angular/animations": "16.2.4",
    "@angular/cdk": "^16.2.3",
    "@angular/common": "16.2.4",
    "@angular/compiler": "16.2.4",
    "@angular/core": "16.2.4",
    "@angular/forms": "16.2.4",
    "@angular/material": "^16.2.3",
    "@angular/platform-browser": "16.2.4",
    "@angular/platform-browser-dynamic": "16.2.4",
    "@nguniversal/express-engine": "^16.2.0",
    "@ngx-translate/core": "^15.0.0",
    "@ngx-translate/http-loader": "^8.0.0",
    "clientjs": "^0.2.1",
    "file-saver": "2.0.2",
    "ngx-uploader": "^17.0.1",
    "rxjs": "^7.8.1",
    "socket.io-client": "2.3.1",
    "tslib": "^2.0.0",
    "zone.js": "~0.13.3"
    },
    "devDependencies": {
    "@angular-devkit/build-angular": "^16.2.1",
    "@angular/cli": "16.2.1",
    "@angular/compiler-cli": "16.2.4",
    "@angular/localize": "16.2.4",
    "@schematics/angular": "10.1.2",
    "@types/jasmine": "~3.6.0",
    "@types/jasminewd2": "2.0.3",
    "@types/node": "16.18.119",
    "@types/socket.io-client": "1.4.34",
    "codelyzer": "^6.0.0",
    "http-server": "0.12.3",
    "jasmine-core": "^5.0.0",
    "jasmine-spec-reporter": "~5.0.0",
    "karma": "6.4.1",
    "karma-chrome-launcher": "~3.1.0",
    "karma-coverage-istanbul-reporter": "3.0.2",
    "karma-jasmine": "~4.0.0",
    "karma-jasmine-html-reporter": "^1.5.0",
    "protractor": "7.0.0",
    "ts-node": "8.3.0",
    "tslint": "6.1.0",
    "typescript": "5.1.6"
    }
    }



    So that the necessary files related to ssr are added to my project.

    Continue reading...

Compartilhe esta Página