Closed galtalmor closed 5 years ago
Oh i think this is not related to angular-ssr
You need to run
npm install --save @angular/platform-browser
@wnabil I have the package installed and it works in normal usage with angular build and serve. I only get this error when running angular-ssr. But just to re-validate, I tried to reinstall it and run angular-ssr again, like you suggested, and got the same result.
Well i am using the angular ssr express and everything is working fine i suggest you to copy that example from the examples folder and copy your code inside it. this is what i did and everything is working fine without any problem.
@wnabil Okay, will try that. Thanks for the suggestion.
are you still having an issue with this?
@e-schultz Yep. Couldn't get neither ng-render nor ssr express working. With ng-render the problem stayed the same. I couldn't figure out what's the issue with platform-browser. It is installed and working perfectly on standard client, but not with ng-render. I'm using latest version of all Angular modules and Angular Material.
@galtalmor Neither of the example repos work for you? I just fetched the latest and was able to build and run both of them. Are you sure that module is installed? Can you do ls node_modules/@angular/platform-browser
?
For existing project:
npm install
npm run build
For new project:
npm install -g @angular/cli
ng new yourprojectname1
Well, this is a year old issue. Probably not relevant anymore, so I'm going to close it.
I'm trying to run the simple setup of
ng-render
for the first time on a pretty simple Angular 4 app I have. For some reason I get the errorUnhandled Promise rejection: Cannot find module '@angular/platform-browser'
. I couldn't find anything related here or on Google, so any help would be appreciated.Obviously I am using the
platform-browser
in my AppModule in the standard way:import { BrowserModule } from '@angular/platform-browser';
Any reason this shouldn't work?The output I get is this: