-
Notifications
You must be signed in to change notification settings - Fork 483
Angular 12 Universal Configuration 'development' is not set in the workspace #2158
Comments
Could you try to delete this line on serve-ssr: I think the problem is that if you use a development configuration they try to use the same configuration on server and build, so if you don't have it have this problem. |
We are wrongly assuming that users are using the Note, in version 12, there is also a new experimental way of SSR, To opt-in you can use |
Thank you, this helps. Now app is running. But for me as a newbie it is not obviously why after installing Angular 12 and Universal I can't run app by command from package.json. Thank you for this bug fix. Now I will upgrade my new pet app to 12 Angular and will try TailWind with it. |
I created new Angular 12 app and install Universal with Then I tried to run app with
An unhandled exception occurred: Could not find any routes to generate. npm ERR! A complete log of this run can be found in: In log: This command runs properly: npm run build:client-and-server This command runs properly: npm run serve:ssr Thank you for answer, but error in |
@TatyanaMolchanova, ummm its strange that a no routes cannot be found when prerendering. Might sharing the project? Also, ideally this should be reported as a separate issue. |
I created new issue: This is the link to my repo with npm run prerender error: https://github.com/TatyanaMolchanova/angular12-universal-prerender-error |
I ran into this issue as well.
|
Thanks for reporting this issue. This issue is now obsolete due to changes in the recent releases. |
This issue has been automatically locked due to inactivity. Read more about our automatic conversation locking policy. This action has been performed automatically by a bot. |
I created new project - client - on Angular 11. Then updated ng version to 12 Angular. Then installed Universal: ng add @nguniversal/express-engine
Then I'm trying to run my Universal Angular, but it throws error:
npm run dev:ssr
client@0.0.0 dev:ssr ng run client:serve-ssr
This is a simple server for use in testing or debugging Angular applications locally. It hasn't been reviewed for security issues.
DON'T USE IT FOR PRODUCTION!
Configuration 'development' is not set in the workspace. npm ERR! code 1 npm ERR! path E:\PRACTICE\MYPETPROJECTS\tanechka\client npm ERR! command failed npm ERR! command C:\WINDOWS\system32\cmd.exe /d /s /c ng run client:serve-ssr
npm ERR! A complete log of this run can be found in: npm ERR! C:\Users\1\AppData\Local\npm-cache_logs\2021-06-08T14_35_07_681Z-debug.log
angular.json
`
package.json:
🐞 Bug report
What modules are related to this issue?
Is this a regression?
No, as I know, the previous version in which this bug was not present was.Description
🔬 Minimal Reproduction
I tried to add 'development' to 'configurations' of serve:
But it didn't work.
I tried to delete all node_modules and then install it, but it didn't work too.
Please, help.
The text was updated successfully, but these errors were encountered: