angular / universal

Server-side rendering and Prerendering for Angular
MIT License
4.04k stars 484 forks source link

Module '"@angular/platform-browser"' has no exported member 'provideClientHydration'. #3247

Closed alucardu closed 1 year ago

alucardu commented 1 year ago

Description

I wanted to use Angular Universal but I'm running into an issue. I'm reading this here > https://angular.io/guide/universal

I've run ng add @nguniversal/express-engine and I got some new files:

But when I import import {provideClientHydration} from '@angular/platform-browser'; I get the error:

Module '"@angular/platform-browser"' has no exported member 'provideClientHydration'.

Angular CLI: 15.1.6 Node: 18.14.0 Package Manager: yarn 1.22.11 OS: win32 x64

Angular: 15.2.9 ... animations, common, compiler, compiler-cli, core, forms ... platform-browser, platform-browser-dynamic, platform-server ... router, youtube-player

Package Version

@angular-devkit/architect 0.1502.9 @angular-devkit/build-angular 15.2.9 @angular-devkit/core 15.1.6 @angular-devkit/schematics 15.1.6 @angular/cdk 15.2.6 @angular/cli 15.1.6 @angular/material 15.2.6 @nguniversal/builders 15.2.1 @nguniversal/express-engine 15.2.1 @schematics/angular 15.1.6 rxjs 7.8.1 typescript 4.9.5

alan-agius4 commented 1 year ago

provideClientHydration was added in version 16.

angular-automatic-lock-bot[bot] commented 1 year ago

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.