angular-universal-express-firebase
angular-universal-express-firebase copied to clipboard
Firebase log: Cannot find module 'tslib'
- Angular: 5.0.1
- angular/cli: 1.5.0
- without
@nguniversal/module-map-ngfactory-loaderas my project doesn't do lazy loading
Tried SSR following guide, firebase serve works well but after deploy, the web fails with Error: could not handle the request.
Firebase trigger function log says it finished with status 'crash':
Error: Cannot find module 'tslib' at Function.Module._resolveFilename (module.js:469:15) at Function.Module._load (module.js:417:25) at Module.require (module.js:497:17) at require (internal/module.js:20:19) at Object.8e9l (/user_code/dist/main.bundle.js:1:3258) at n (/user_code/dist/main.bundle.js:1:211) at Object.bNRb (/user_code/dist/main.bundle.js:1:34420) at n (/user_code/dist/main.bundle.js:1:211) at Object.JwoV (/user_code/dist/main.bundle.js:1:11671) at n (/user_code/dist/main.bundle.js:1:211)
Current version 0.0.4 doesn't seem to work with Angular 5 yet. Downgraded to Angular 4.4.6 and got SSR back to work.
I've installed this tslib module manually and then the error should be gone. However, when I deploy my app to firebase I get the following error: Error: Forbidden Your client does not have permission to get URL /ssr/ from this server.
I have no clue on what to do here.
@StudioTOB Make sure you're including some static files for Firebase Hosting in the public folder and deploy both. firebase deploy --only hosting,functions.
On another note, I do need to work on getting this up to Angular 6.
@davideast Thanks for your reply. Can you show me where that folder should be. In the functions folder I have a dist folder and a dist-server folder. Does the public folder also have to be in the functions folder? And where do I have to tell firebase where this public folder lives?
Thanks for your time.