Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

firebase serve config #4

Closed
vladiim opened this issue May 18, 2016 · 3 comments
Closed

firebase serve config #4

vladiim opened this issue May 18, 2016 · 3 comments
Assignees

Comments

@vladiim
Copy link

vladiim commented May 18, 2016

Whilst working through you Web Chat App Javascript tutorial I hit an error when executing firebase serve.

From, firebase-debug.log:
[debug] TypeError: Cannot read property 'public' of undefined at Server.<anonymous> (/usr/local/lib/node_modules/firebase-tools/commands/serve.js:25:15)

I was able to prevent this error by commenting out the following lines in serve.js (obviously not ideal):
if (config.public && config.public !== '.') { logger.info(chalk.bold('Public Directory:'), config.public); }

@uzusan
Copy link

uzusan commented May 18, 2016

I had a similar issue. If you go into the web-start directory and run:
firebase init
when you get to this question:

=== Hosting Setup

Your public directory is the folder (relative to your project directory) that
will contain Hosting assets to uploaded with firebase deploy. If you
have a build process for your assets, use your build's output directory.

? What do you want to use as your public directory?

You can use ./ here (make sure you tell it not to redirect links or overwrite index.html as well in the other steps for init).

When you get to step 13:
https://codelabs.developers.google.com/codelabs/firebase-web/#12

firebase.json has a section that does the same thing:

"hosting": {
    "public": "./",

@vladiim
Copy link
Author

vladiim commented May 18, 2016

Thanks @uzusan, I was sure it was a rookie error.

@nicolasgarnier
Copy link
Contributor

Thanks for the report guys. I'll fix this. It seems the alpha version of the CLI that I was using did not require the hosting/public attribute to be set but it now does...

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants