angular / angular-cli

CLI tool for Angular
https://cli.angular.io
MIT License
26.74k stars 11.98k forks source link

ng add @nguniversal/express-engine@14.0.0 is installing the package but, not creating the server files like server.ts. Getting error #27365

Closed ManojShetty7 closed 6 months ago

ManojShetty7 commented 6 months ago

Command

add

Is this a regression?

The previous version in which this bug was not present was

No response

Description

Hi everyone, here I'm trying to install ng add @nguniversal/express-engine@14.0.0 package to my angular project which is running on angular 14.0.0 But I'm getting error as Schematic input does not validate against the Schema: {"project":"app","appId":"serverApp","main":"main.server.ts","rootModuleFileName":"app.server.module.ts","rootModuleClassName":"AppServerModule","skipInstall":true} Errors:

Data path "" must NOT have additional properties(appDir). node version is, 20.11.1 And, If i use just ng add @nguniversal/express-engine, then I'll get error as NOT SUPPORTED: keyword "id", use "$id" for schema ID my package.json is { "name": "learn", "version": "0.0.1", "author": "Ionic Framework", "homepage": "https://ionicframework.com/", "scripts": { "ng": "ng", "start": "ng serve --host=0.0.0.0 --port=8100 --hmr -o", "build": "ng build", "test": "ng test", "lint": "ng lint --fix", "e2e": "ng e2e", "dev": "concurrently --kill-others \"npm run start\" \"npx tailwindcss -i ./src/styles.css -o ./src/theme/output.css --watch\"", "scully": "npx scully --", "scully:serve": "npx scully serve --" }, "private": true, "dependencies": { "@agm/core": "^3.0.0-beta.0", "@angular/cdk": "14.0.4", "@angular/common": "^14.0.0", "@angular/core": "^14.0.0", "@angular/fire": "^7.4.1", "@angular/forms": "^14.0.0", "@angular/platform-browser": "^14.3.0", "@angular/platform-browser-dynamic": "^14.0.0", "@angular/router": "^14.0.0", "@fortawesome/fontawesome-free": "^6.2.0", "@ionic/angular": "^6.1.9", "@ng-select/ng-select": "^6.1.0", "@ngrx/effects": "^14.0.2", "@ngrx/router-store": "^14.0.2", "@ngrx/schematics": "^14.0.2", "@ngrx/store": "^14.0.2", "@ngrx/store-devtools": "^14.0.2", "@nguniversal/express-engine": "^14.0.0", "@scullyio/init": "^2.1.41", "@scullyio/ng-lib": "^2.1.0", "@scullyio/scully": "^2.1.0", "@scullyio/scully-plugin-puppeteer": "^2.1.0", "@sentry/angular": "^7.31.1", "@sentry/tracing": "^7.31.1", "@smartbear/browser-info": "^1.5.0", "@supy-io/ngx-intercom": "^14.2.12", "@trademe/ng-add-to-calendar": "^3.2.0", "@types/googlemaps": "3.39.12", "chart.js": "^3.9.1", "date-fns": "^2.29.1", "firebase": "^9.9.0", "ng2-charts": "^4.0.0", "ngx-cookie-service": "^14.0.1", "ngx-youtube-player": "^12.0.2", "rxjs": "~6.6.0", "tinymce": "^6.1.2", "tslib": "^2.2.0", "zone.js": "~0.11.4" }, "devDependencies": { "@angular-devkit/build-angular": "^14.0.0", "@angular-eslint/builder": "~13.0.1", "@angular-eslint/eslint-plugin": "~13.0.1", "@angular-eslint/eslint-plugin-template": "~13.0.1", "@angular-eslint/template-parser": "~13.0.1", "@angular/cli": "^14.0.0", "@angular/compiler": "^14.0.0", "@angular/compiler-cli": "^14.0.0", "@angular/language-service": "^14.0.0", "@ionic/angular-toolkit": "^6.0.0", "@ngrx/eslint-plugin": "^14.0.2", "@types/jasmine": "~3.6.0", "@types/jasminewd2": "~2.0.3", "@types/node": "^12.11.1", "@typescript-eslint/eslint-plugin": "5.3.0", "@typescript-eslint/parser": "5.3.0", "autoprefixer": "^10.4.7", "concurrently": "^7.2.2", "eslint": "^7.6.0", "eslint-plugin-import": "2.22.1", "eslint-plugin-jsdoc": "30.7.6", "eslint-plugin-prefer-arrow": "1.2.2", "jasmine-core": "~3.8.0", "jasmine-spec-reporter": "~5.0.0", "karma": "~6.3.2", "karma-chrome-launcher": "~3.1.0", "karma-coverage": "~2.0.3", "karma-coverage-istanbul-reporter": "~3.0.2", "karma-jasmine": "~4.0.0", "karma-jasmine-html-reporter": "^1.5.0", "postcss": "^8.4.14", "protractor": "~7.0.0", "tailwindcss": "^3.1.6", "ts-node": "~8.3.0", "typescript": "~4.7.3" }, "description": "An Ionic project" }

my angular.json is

{ "$schema": "./node_modules/@angular/cli/lib/config/schema.json", "version": 1, "newProjectRoot": "projects", "defaultProject": "app", "projects": { "app": { "root": "", "sourceRoot": "src", "projectType": "application", "prefix": "app", "schematics": {}, "architect": { "build": { "builder": "@angular-devkit/build-angular:browser", "options": { "allowedCommonJsDependencies": [ "@trademe/ng-add-to-calendar", "@smartbear/browser-info", "rudder-sdk-js" ], "outputPath": "www", "index": "src/index.html", "main": "src/main.ts", "polyfills": "src/polyfills.ts", "tsConfig": "tsconfig.app.json", "assets": [ { "glob": "/*", "input": "src/assets", "output": "assets" }, { "glob": "*/.svg", "input": "node_modules/ionicons/dist/ionicons/svg", "output": "./svg" } ], "styles": [ "../new-theme/css/theme/variables.scss", "src/global.scss", "../new-theme/css/global.scss", "node_modules/@fortawesome/fontawesome-free/css/all.css" ], "scripts": [ "node_modules/@fortawesome/fontawesome-free/js/all.js" ], "aot": false, "vendorChunk": true, "extractLicenses": false, "buildOptimizer": false, "sourceMap": true, "optimization": false, "namedChunks": true }, "configurations": { "production": { "fileReplacements": [ { "replace": "src/environments/environment.ts", "with": "src/environments/environment.prod.ts" } ], "optimization": true, "outputHashing": "all", "sourceMap": false, "namedChunks": false, "aot": true, "extractLicenses": true, "vendorChunk": false, "buildOptimizer": true, "budgets": [ { "type": "initial", "maximumWarning": "2mb", "maximumError": "5mb" }, { "type": "anyComponentStyle", "maximumWarning": "3kb", "maximumError": "4kb" } ] }, "ci": { "progress": false } } }, "serve": { "builder": "@angular-devkit/build-angular:dev-server", "options": { "browserTarget": "app:build" }, "configurations": { "production": { "browserTarget": "app:build:production" }, "ci": { "progress": false } } }, "extract-i18n": { "builder": "@angular-devkit/build-angular:extract-i18n", "options": { "browserTarget": "app:build" } }, "test": { "builder": "@angular-devkit/build-angular:karma", "options": { "main": "src/test.ts", "polyfills": "src/polyfills.ts", "tsConfig": "tsconfig.spec.json", "karmaConfig": "karma.conf.js", "styles": [], "scripts": [], "assets": [ { "glob": "favicon.ico", "input": "src/", "output": "/" }, { "glob": "/*", "input": "src/assets", "output": "/assets" } ] }, "configurations": { "ci": { "progress": false, "watch": false } } }, "lint": { "builder": "@angular-eslint/builder:lint", "options": { "lintFilePatterns": [ "src/*/.ts", "src/*/.html" ] } }, "e2e": { "builder": "@angular-devkit/build-angular:protractor", "options": { "protractorConfig": "e2e/protractor.conf.js", "devServerTarget": "app:serve" }, "configurations": { "production": { "devServerTarget": "app:serve:production" }, "ci": { "devServerTarget": "app:serve:ci" } } } } } }, "cli": { "schematicCollections": [ "@ionic/angular-toolkit" ], "analytics": "ca60f425-cc60-42a1-9130-9adc7fdcb63e" }, "schematics": { "@ionic/angular-toolkit:component": { "styleext": "scss" }, "@ionic/angular-toolkit:page": { "styleext": "scss" } } }

Minimal Reproduction

ng add @nguniversal/express-engine@14.0.0 ng add @nguniversal/express-engine

Exception or Error

Schematic input does not validate against the Schema: {"project":"app","appId":"serverApp","main":"main.server.ts","rootModuleFileName":"app.server.module.ts","rootModuleClassName":"AppServerModule","skipInstall":true}
Errors:

  Data path "" must NOT have additional properties(appDir).

Your Environment

Angular CLI: 14.2.13
Node: 20.11.1 (Unsupported)
Package Manager: npm 6.14.18
OS: win32 x64

Angular: 14.3.0
... common, compiler, compiler-cli, core, forms
... language-service, platform-browser, platform-browser-dynamic
... router

Package                         Version
---------------------------------------------------------
@angular-devkit/architect       0.1402.13
@angular-devkit/build-angular   14.2.13
@angular-devkit/core            16.2.13
@angular-devkit/schematics      16.2.13
@angular/cdk                    14.0.4
@angular/cli                    14.2.13
@angular/fire                   7.6.1
@nguniversal/express-engine     14.0.0
@schematics/angular             16.2.13
rxjs                            6.6.7
typescript                      4.7.4

Anything else relevant?

No response

alan-agius4 commented 6 months ago

Angular version 14 is no longer supported. Please see: https://angular.io/guide/releases#actively-supported-versions

angular-automatic-lock-bot[bot] commented 5 months ago

This issue has been automatically locked due to inactivity. Please file a new issue if you are encountering a similar or related problem.

Read more about our automatic conversation locking policy.

This action has been performed automatically by a bot.