Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

prerender fails on new angular-cli 12 app #2120

Closed
amitport opened this issue May 22, 2021 · 2 comments · Fixed by #2123
Closed

prerender fails on new angular-cli 12 app #2120

amitport opened this issue May 22, 2021 · 2 comments · Fixed by #2123

Comments

@amitport
Copy link
Contributor

amitport commented May 22, 2021

using @angular/cli@12.0.1

ng new app
ng add @nguniversal/express-engine
npm run build:ssr
npm run prerender

gives the following error:

Schema validation failed with the following errors:
  Data path "" must have required property 'serverTarget'

manually adding "serverTarget": "appname:server:production" to angular.json seems to work, but this probably should be done by the @nguniversal/express-engine schematics

I get that there may be a configuration step I'm missing, but the documentation is very unclear about this, and I couldn't find additional info about the prerender npm task.

Thank you

@alan-agius4
Copy link
Collaborator

@amitport indeed this is bug

alan-agius4 pushed a commit that referenced this issue May 23, 2021
Add `serverTarget` for the prerender architect in the install schematic

Closes #2120
alan-agius4 pushed a commit that referenced this issue May 23, 2021
Add `serverTarget` for the prerender architect in the install schematic

Closes #2120

(cherry picked from commit ccc0fc1)
@angular-automatic-lock-bot
Copy link

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.

@angular-automatic-lock-bot angular-automatic-lock-bot bot locked and limited conversation to collaborators Jun 23, 2021
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants