davideast / angular-universal-express-firebase

A packaged Cloud Function to serve Angular Universal apps.
50 stars 9 forks source link

TypeError: readFile$(...).mergeMap is not a function #18

Open IngAjVillalon opened 5 years ago

IngAjVillalon commented 5 years ago

Hello, my brother, I followed the guide of Angular Universal: server-side rendering as explained in the official documentation of Angular: https://angular.io/guide/universal I managed to run the application correctly having the 2 bundles, the browser and the server bundles. I followed the steps of your video too: Angular Universal and Firebase Hosting. And I also followed on your partner's video: Getting Started with Cloud Functions for Firebase using TypeScript. I used your angular-universal-express-firebase module to run the application within firebase functions and when I run the firebase serve of functions I get this error:

TypeError: readFile$(...).mergeMap is not a function at projectPath\functions\node_modules\angular-universal-express\index.js:36:14 at Layer.handle [as handle_request] (projectPath\functions\node_modules\express\lib\router\layer.js:95:5) at next (projectPath\functions\node_modules\express\lib\router\route.js:137:13) at Route.dispatch (projectPath\functions\node_modules\express\lib\router\route.js:112:3) at Layer.handle [as handle_request] (projectPath\functions\node_modules\express\lib\router\layer.js:95:5) at projectPath\functions\node_modules\express\lib\router\index.js:281:22 at param projectPath\functions\node_modules\express\lib\router\index.js:354:14) at param (projectPath\functions\node_modules\express\lib\router\index.js:365:14) at Function.process_params (projectPath\functions\node_modules\express\lib\router\index.js:410:3) at next (projectPath\functions\node_modules\express\lib\router\index.js:275:10)

I have this in my package.json file

"dependencies": { "@angular/animations": "^6.0.0", "@angular/cdk": "^6.0.2", "@angular/common": "^6.0.0", "@angular/compiler": "^6.0.0", "@angular/core": "^6.0.0", "@angular/flex-layout": "^5.0.0-beta.14", "@angular/forms": "^6.0.0", "@angular/http": "^6.0.0", "@angular/material": "^6.1.0", "@angular/platform-browser": "^6.0.0", "@angular/platform-browser-dynamic": "^6.0.0", "@angular/platform-server": "^6.1.3", "@angular/router": "^6.0.0", "@nguniversal/express-engine": "^6.1.0", "@nguniversal/module-map-ngfactory-loader": "^6.0.0", "@toverux/ngx-sweetalert2": "^4.0.0", "angular-universal-express-firebase": "0.0.4", "angularfire2": "^5.0.0-rc.11", "core-js": "^2.5.4", "express": "^4.16.3", "firebase": "^5.3.0", "firebase-admin": "~6.0.0", "firebase-functions": "^2.0.5", "hammerjs": "^2.0.8", "ngx-toastr": "^8.10.0", "rxjs": "^6.0.0", "rxjs-compat": "^6.2.0", "sweetalert2": "^7.21.1", "zone.js": "^0.8.26" }, "devDependencies": { "@angular-devkit/build-angular": "~0.6.0", "@angular-devkit/schematics": "^0.7.5", "@angular/cli": "~6.0.0", "@angular/compiler-cli": "^6.0.0", "@angular/language-service": "^6.0.0", "@types/jasmine": "~2.8.6", "@types/jasminewd2": "~2.0.3", "@types/node": "~8.9.4", "codelyzer": "~4.2.1", "jasmine-core": "~2.99.1", "jasmine-spec-reporter": "~4.2.1", "karma": "~1.7.1", "karma-chrome-launcher": "~2.2.0", "karma-coverage-istanbul-reporter": "~1.4.2", "karma-jasmine": "~1.1.1", "karma-jasmine-html-reporter": "^0.2.2", "protractor": "~5.3.0", "ts-loader": "^4.5.0", "ts-node": "~5.0.1", "tslint": "~5.9.1", "typescript": "~2.7.2", "webpack-cli": "^3.1.0" }, "private": true

Can you help me? What am I doing wrong? Please.

Crewnie commented 5 years ago

I have the same problem, please @davideast help us

publiherz-crewnie commented 5 years ago

What versions should We put in the dependencies to make it work?

WisaniShilumani commented 5 years ago

I'm using npm i angular7-universal-express-firebase for now. I refactored it to work for Angular 7

https://www.npmjs.com/package/angular7-universal-express-firebase

ribalnasr commented 5 years ago

@WisaniShilumani does your version support lazy loading? I'm trying to make it work with no success.

ribalnasr commented 5 years ago

@davideast should we expect an update on this issue soon? cuz am really desperate.

ribalnasr commented 5 years ago

Seems like everybody is busy with something else :), meanwhile I finally managed to create this repo: https://github.com/ribalnasr/angular-universal-firebase-functions-boilerplate

It's a boilerplate for an angular/firebase project, with Universal pre-installed and configured to get you up running quickly.