Angular universal schematic broken on v7.3.5
π Bug report
Command (mark with an x)
- [ ] new
- [ ] build
- [ ] serve
- [ ] test
- [ ] e2e
- [ ] generate
- [X] add
- [ ] update
- [ ] lint
- [ ] xi18n
- [ ] run
- [ ] config
- [ ] help
- [ ] version
- [ ] doc
Is this a regression?
I see it working in 7.2.4
Description
A clear and concise description of the problem...Running ng add @nguniversal/express-engine --clientProject [existingProjectName] only installs @nguniversal/[email protected] and does not create or change files
π¬ Minimal Reproduction
Update to cli v7.3.5
run ng new new-project
run ng add @nguniversal/express-engine --clientProject new-project
π₯ Exception or Error
π Your Environment
Angular CLI: 7.3.5
Node: 8.12.0
OS: darwin x64
Angular: 7.2.9
... animations, common, compiler, compiler-cli, core, forms
... http, language-service, platform-browser
... platform-browser-dynamic, router
Package Version
-----------------------------------------------------------
@angular-devkit/architect 0.13.5
@angular-devkit/build-angular 0.11.4
@angular-devkit/build-optimizer 0.11.4
@angular-devkit/build-webpack 0.11.4
@angular-devkit/core 7.3.5
@angular-devkit/schematics 7.3.5
@angular/cli 7.3.5
@ngtools/webpack 7.1.4
@schematics/angular 7.3.5
@schematics/update 0.13.5
rxjs 6.4.0
typescript 3.1.6
webpack 4.23.1
Anything else relevant?
@Fattouh92, before running ng add are you changing the directory to new-project
ie: cd new-project?
I am unable to reproduction the issue from my end.
ng add @nguniversal/express-engine --clientProject new-project
Installing packages for tooling via npm.
npm WARN @nguniversal/[email protected] requires a peer of @angular/platform-server@^7.1.4 but none is installed. You must install peer dependencies yourself.
+ @nguniversal/[email protected]
added 1 package and audited 42610 packages in 12.628s
found 0 vulnerabilities
Installed packages for tooling via npm.
CREATE src/main.server.ts (220 bytes)
CREATE src/app/app.server.module.ts (427 bytes)
CREATE src/tsconfig.server.json (219 bytes)
CREATE webpack.server.config.js (1360 bytes)
CREATE server.ts (1472 bytes)
UPDATE package.json (1874 bytes)
UPDATE angular.json (4411 bytes)
UPDATE src/main.ts (432 bytes)
Yes I am changing to the directory, my bad I left it out
Can you share the complete output of the console?
$ ng add @nguniversal/express-engine --clientProject web-client
Installing packages for tooling via npm.
npm WARN @smec/[email protected] requires a peer of ngx-toastr@^8.10.0 but none is installed. You must install peer dependencies yourself.
npm WARN [email protected] requires a peer of [email protected] - 3 but none is installed. You must install peer dependencies yourself.
npm WARN [email protected] requires a peer of popper.js@^1.14.7 but none is installed. You must install peer dependencies yourself.
npm WARN [email protected] requires a peer of jasmine-core@>=3.3 but none is installed. You must install peer dependencies yourself.
npm WARN [email protected] requires a peer of @angular/common@^6.0.0-rc.0 || ^6.0.0 but none is installed. You must install peer dependencies yourself.
npm WARN [email protected] requires a peer of @angular/core@^6.0.0-rc.0 || ^6.0.0 but none is installed. You must install peer dependencies yourself.
npm WARN @nguniversal/[email protected] requires a peer of @angular/platform-server@^7.1.4 but none is installed. You must install peer dependencies yourself.
+ @nguniversal/[email protected]
added 1 package and audited 42491 packages in 8.521s
found 3 vulnerabilities (1 low, 2 high)
run `npm audit fix` to fix them, or `npm audit` for details
Installed packages for tooling via npm.
Hi, I looked into this and I am still unable to replicate this issue on a newly generated project. Unfortunately, if no one is able to replicate this and provide some further info we'll be unable to address this.
I was able to use the ng g universal schematic with the latest package versions, but now I don't know how to complete the server configuration in the angular.json to get the whole site built, currently, I'm just getting the main.js in the output (I'm evidently quite new to SSR, and I was expecting to get a static copy of my Angular App, sorry)
Hi @matheo, I suggest to redirect support requests to StackOverflow using tag angular-cli or gitter.
If you are wondering why we don't resolve support issues via the issue tracker, please check out this explanation.
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.