Closed neoswf closed 1 year ago
We understand this issue is a sore spot, and I think there is some movement behind the scenes to get this fixed. I myself would love to help plug the gaps in the documentation, and it would be a great help to get your input on the best route.
So, please chime in with your opinion on where it would be most useful to store the documentation, keeping in mind that angular.io already contains an excellent "Getting Started with Universal" guide.
Options I can think of off the top of my head:
The Getting Started is also not updated - https://universal.angular.io/quickstart/ (Typings, Angular 2, etc..)
@neoswf Setting Universal (server-side rendering) for your current app is not something easy to do since you will get some errors for some different reasons.
I suggest you start with a new project and try to add Universal to it. It will give you the basic understanding of how all those stuff works together.
also, this article will help you to understand basic concepts of Universal, and this Story on the Angular-cli wiki is very helpful as well.
Also, I highly recommend you to start from angular/universal-starter
The current problem with the Angular.io universal guide is that it's explaining using universal, using custom webpack, while most of users are using CLI. Take a look at this PR
@m98 Your recommendation, angular/universal-starter, really helped me!
@CaerusKaru The quickstart probably requires some updating. I'm pretty new to Javascript frameworks in general, so it could be something big I'm missing.
I encountered difficulty at 2. Install Dependencies.
Particularly, with this line typings install node express body-parser serve-static express-serve-static-core mime --ambient
.
Several errors were thrown here. --ambient
flag is deprecated. Tried using --global
, but other exceptions were thrown:
typings ERR! message Unable to find "node" ("npm") in the registry.
typings ERR! message However, we found "node" for 2 other sources: "dt" and "env"
typings ERR! message You can install these using the "source" option.
typings ERR! message We could use your help adding these typings to the registry: https://github.com/typings/registry
typings ERR! caused by https://api.typings.org/entries/npm/node/versions/latest responded with 404, expected it to equal 200
typings ERR!
typings ERR! cwd /home/ed/BlogCrazyTechnology
typings ERR! system Linux 4.13.0-19-generic
typings ERR! command "/home/ed/.nvm/versions/node/v9.3.0/bin/node" "/home/ed/.nvm/versions/node/v9.3.0/bin/typings" "install" "node" "express" "body-parser" "serve-static" "express-serve-static-core" "mime" "--global"
typings ERR! node -v v9.3.0
typings ERR! typings -v 2.1.1
typings ERR!
typings ERR! If you need help, you may report this error at:
typings ERR! <https://github.com/typings/typings/issues>
Adding dt~
yielded additional errors:
typings install dt~node dt~express dt~body-parser serve-static express-serve-static-core mime --global
typings INFO globaldependencies "serve-static" lists global dependencies on "node" that must be installed manually
typings ERR! message Attempted to compile "express" as a global module, but it looks like an external module. You'll need to remove the global option to continue.
typings ERR!
typings ERR! cwd /home/ed/BlogCrazyTechnology
typings ERR! system Linux 4.13.0-19-generic
typings ERR! command "/home/ed/.nvm/versions/node/v9.3.0/bin/node" "/home/ed/.nvm/versions/node/v9.3.0/bin/typings" "install" "dt~node" "dt~express" "dt~body-parser" "serve-static" "express-serve-static-core" "mime" "--global"
typings ERR! node -v v9.3.0
typings ERR! typings -v 2.1.1
typings ERR!
typings ERR! If you need help, you may report this error at:
typings ERR! <https://github.com/typings/typings/issues>
@EdwinChua I have the same error, did you find a way to solve it?
This project is overly opinionated, but does have everything using the latest dependencies!
https://github.com/patrickmichalina/fusebox-angular-universal-starter
@patrickmichalina I tried to install your fusebox-angular-universal-starter
51828 error errno 1
51829 error fusebox-angular-universal-starter@0.0.0-development postinstall: `ts-node fuse.ts clean`
51829 error Exit status 1
51830 error Failed at the fusebox-angular-universal-starter@0.0.0-development postinstall script.
51830 error This is probably not a problem with npm. There is likely additional logging output above.
51831 verbose exit [ 1, true ]
i wish i could have a bare angular-universal that just works. It has been several days and I still haven't figured out. https://github.com/angular/universal-starter is also dead and doesn't render server side in ngOnInit
. frustrating...
is also dead and doesn't render server side in ngOnInit
Could you elaborate? have you opened an issue with a reproduction? It works fine for me.
hey, sorry I've read again the docs and managed to render ngOnInit
on server side, but that whole experience could have been better, too many outdated docs and tutorials
@intergleam Agreed, we understand that's an issue and it's our primary focus for the immediate
@f1729 I dropped the idea of converting my app to Universal in Dec, as I did not have much success.
However, I came across https://angular.io/guide/universal some time last week, and following the instructions there, it took me only a couple of hours to convert my application (small) to Universal.
https://universal.angular.io now redirects to the angular.io Universal guide That guide is basically a walk through of the https://github.com/angular/universal-starter repository We also have a few docs under the /docs directory in this repo explaining other points
It does seem like the Universal SSR Guide on AIO is lacking any mention of Domino.
Thanks for reporting this issue. This issue is now obsolete due to changes in the recent changes in the docs.
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.
The weakest and most problematic part of Universal is its lack of good & updated documentation. The few tutorials & docs that you guys provided are outdated and after using some of them, you discover that they are no good. I tried to use Universal and gave up. Code did not work and the overall experience was just bad. Now, with the release of the Universal's Ng5 highly expected version for third parties scripts support, I was disappointed to see that the documentation does not mention anything about Domino new addition to Universal.
Really. I love Universal. I promoted it like crazy till I started to suffer from problems with Third Party Scripts implementation, and I gave up. I really wish to return back, but it's impossible for me or many developers in the community to do so, when the documentation is just so hard, or impossible to use.
You want an example? heres some: I saw in NG5 press release that Domino is implemented, and now we can work with jquery, etc. Searching the project code, I could find only 1 line of code mentioning Domino and nothing else. Couldn't find any documentation regarding NG5 new implementations, in fact Universal seems like a frozen project without any father or mother.
Please, take the documentation seriously, because it will define the technology adaptation success, and as it is now, I cannot see how it will succeed.