davideast / angular-universal-express-firebase

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

Error while serving - root path required #6

Closed StephenFluin closed 6 years ago

StephenFluin commented 6 years ago

Finished all install setup steps (I believe)


firebase serve --only functions,hosting

=== Serving from '/Users/stephenfluin/workspace/fidget-spinner'...

i  functions: Preparing to emulate HTTPS functions. Support for other event types coming soon.
Warning: You're using Node.js v7.1.0 but Google Cloud Functions only supports v6.11.1.
i  hosting: Serving hosting files from: dist
✔  hosting: Local server: http://localhost:5000

Server#addProtoService is deprecated. Use addService instead
⚠  functions: Failed to load functions source code. Ensure that you have the latest SDK by running npm i --save firebase-functions inside the functions directory. Please note that emulation of custom config values are not supported yet. Run firebase serve --only hosting to only serve hosting files.

FirebaseError: Error occurred while parsing your function triggers.

TypeError: root path required
    at Function.serveStatic [as static] (/Users/stephenfluin/workspace/fidget-spinner/functions/node_modules/serve-static/index.js:40:11)
    at createExpressApp (/Users/stephenfluin/workspace/fidget-spinner/functions/node_modules/angular-universal-express-firebase/index.js:29:34)
    at Object.exports.trigger (/Users/stephenfluin/workspace/fidget-spinner/functions/node_modules/angular-universal-express-firebase/index.js:12:38)
    at Object.<anonymous> (/Users/stephenfluin/workspace/fidget-spinner/functions/index.js:11:36)
    at Module._compile (module.js:573:32)
    at Object.Module._extensions..js (module.js:582:10)
    at Module.load (module.js:490:32)
    at tryModuleLoad (module.js:449:12)
    at Function.Module._load (module.js:441:3)
    at Module.require (module.js:500:17)
i  functions: No HTTPS functions emulated. Support for other function types are coming soon.```
mrjmd commented 6 years ago

I had this same issue, and I think this may be related to #5. When I changed the line indicated in valueExists() return as explained in #5 I was able to get past this point.

mrjmd commented 6 years ago

PR here: #7.