Closed manzapanza closed 4 years ago
Seems more like a ng-cli issue with that particular generator that our own, as the expected path (/src/@app) vs (src/app) is not derived properly from angular.json
config.
If it's just a path (app vs @app) issue, that could be an easy fix we can do anyways.
See also https://github.com/ngx-rocket/generator-ngx-rocket/issues/230 for reference as Angular universal may not be supported yet.
"If it's just a path (app vs @app) issue, that could be an easy fix we can do anyways."
This is exactly what my issue is. Did we have a resolution on this?
I tried with a plain app coming from ng new
and they have the exact same path structure.
Seems to me that the problems comes from the @nguniversal/express-engine
schematics that do not properly takes in account the typescript path alias @app
set in tsconfig.json
, causing this failure. Unfortunately, I see nothing that we can do on our side, you should try posting this issue to the @nguniversal/express-engine repo.
In the meantime, you can try substituting @app/
imports in your apps with full absolute paths (ie /src/app
) and remove the alias from tsconfig.json
.
I updated import { AppModule } from '@app/app.module';
to import { AppModule } from './app/app.module';
in my main.ts.
After install, I switched it back.
I had a very similar problem, documented here and @imomin 's answer worked.
Closing as the issue should be moved to @nguniversal/express-engine
repo.
I'm submitting a...
Current behavior
I'm follow the documentation to add universal server side rendering to the project:
Running the command:
The command install the package
@nguniversal/express-engine
but after that I get this error:I tried also with a fresh new generated project with the version 6.1.0, but I get the same error.
Expected behavior
This command should install the package
@nguniversal/express-engine
and edit the project adding some new files and editing some others.. something like that:Minimal reproduction of the problem with instructions
Environment