ngx-rocket / generator-ngx-rocket

:rocket: Extensible Angular 14+ enterprise-grade project generator
https://ngx-rocket.github.io/
MIT License
1.53k stars 216 forks source link

Error when adding SSR support from angular-cli #546

Closed damiencal closed 4 years ago

damiencal commented 4 years ago

I'm submitting a...

Current behavior

When adding SSR using Angular CLI: ng add @nguniversal/express-engine

This error appears: Module file (/src/@app/app.module.ts) not found

Expected behavior

Using Angular-CLI commands should work with ngx-rocket so that SSR can be added.

Minimal reproduction of the problem with instructions

Environment



ngX-Rocket: 8.0.0
Node.js: v12.16.1
Npm: 6.14.4
OS: linux x64 5.5.11-200.fc31.x86_64

Generated project options:
{
  "generator-ngx-rocket": {
    "version": "8.0.0",
    "props": {
      "location": "path",
      "strict": false,
      "skipInstall": false,
      "skipQuickstart": false,
      "initGit": true,
      "usePrefix": true,
      "appName": "iko",
      "target": [
        "web",
        "cordova"
      ],
      "pwa": true,
      "mobile": [
        "ios",
        "android"
      ],
      "ui": "bootstrap",
      "auth": true,
      "lazy": true,
      "angulartics": true,
      "languages": [
        "de-DE",
        "en-US",
        "fr-FR",
        "zh-CN"
      ],
      "analyticsProvider": "gtm",
      "tools": [
        "prettier",
        "hads",
        "compodoc",
        "jest",
        "puppeteer"
      ],
      "utility": [],
      "deploy": "none",
      "projectName": "iko",
      "packageManager": "npm",
      "desktop": []
    }
  }
}

     _                      _                 ____ _     ___
    / \   _ __   __ _ _   _| | __ _ _ __     / ___| |   |_ _|
   / △ \ | '_ \ / _` | | | | |/ _` | '__|   | |   | |    | |
  / ___ \| | | | (_| | |_| | | (_| | |      | |___| |___ | |
 /_/   \_\_| |_|\__, |\__,_|_|\__,_|_|       \____|_____|___|
                |___/

Angular CLI: 9.1.0
Node: 12.16.1
OS: linux x64

Angular: 9.1.0
... animations, cli, common, compiler, compiler-cli, core, forms
... language-service, localize, platform-browser
... platform-browser-dynamic, router, service-worker
Ivy Workspace: Yes

Package                           Version
-----------------------------------------------------------
@angular-devkit/architect         0.901.0
@angular-devkit/build-angular     0.901.0
@angular-devkit/build-optimizer   0.901.0
@angular-devkit/build-webpack     0.901.0
@angular-devkit/core              9.1.0
@angular-devkit/schematics        9.1.0
@ngtools/webpack                  9.1.0
@nguniversal/common               9.1.0
@nguniversal/express-engine       9.1.0
@schematics/angular               9.1.0
@schematics/update                0.901.0
rxjs                              6.5.4
typescript                        3.8.3
webpack                           4.42.0

Others:

Fedora 31, NPM

sinedied commented 4 years ago

Please see https://github.com/ngx-rocket/generator-ngx-rocket/issues/472 for background and workaround.

This issue should be posted to @nguniversal/express-engine as it seems their schematics cannot follow typescript path aliases.