How to view the Polymerfire demo using Polymer’s `

2019-06-25 13:41发布

I want to view this demo of Polymerfire in my browser.

I expect to see the demo run in my browser. Instead, I see a blank page and the following console error.

console.log.error.message

GET http://localhost:8080/ 404 (Not Found)
Navigated to http://localhost:8080/

I used the following procedure:

  1. I installed the Polymer-CLI multi-tool per the instructions found here.
  2. I created a project using the Polymer Starter Kit (PSK).
  3. I named the project my-app.
  4. I installed the Github repo found here using the CLI:
    bower install ---save firebase/polymerfire
  5. I opened the terminal and navigated to the app's root directory.
    cd path/to/my-app
  6. I ran the following Polymer-CLI command (per the instructions found here).
    polymer serve

What can I do to try and solve this so I can see the demo run in my browser?

2条回答
萌系小妹纸
2楼-- · 2019-06-25 13:59

You also have to navigate to the correct localhost path:
http://localhost:8080/components/polymerfire/demo/

So the complete procedure (from the command line) is:

First, install the polymer-cli per the instructions found here.

npm install -g bower
npm install -g polymer-cli

Then run the following.

shell.sh
git clone https://github.com/firebase/polymerfire.git
cd polymerfire
bower install
polymer serve
open http://localhost:8080/components/polymerfire/demo/
查看更多
Deceive 欺骗
3楼-- · 2019-06-25 14:04

The best way to run an elements demo is to check it out...

git clone https://github.com/firebase/polymerfire.git

cd polymerfire

bower install

polymer serve

I have never tried to run the demos from a bower install'd folder but, the above method will work.

查看更多
登录 后发表回答