1
votes

I'm trying to run the Polymer starter kit but when I try to run 'gulp serve' (without the quotation) it opens the page on the browser, but it's not showing anything.

When I inspect the JS console, I'm getting the following errors:

http://localhost:3000/bower_components/webcomponentsjs/webcomponents-lite.js Failed to load resource: the server responded with a status of 404 (Not Found) http://localhost:3000/bower_components/iron-flex-layout/classes/iron-flex-layout.html Failed to load resource: the server responded with a status of 404 (Not Found) http://localhost:3000/bower_components/iron-icons/iron-icons.html Failed to load resource: the server responded with a status of 404 (Not Found) http://localhost:3000/bower_components/iron-pages/iron-pages.html Failed to load resource: the server responded with a status of 404 (Not Found) http://localhost:3000/bower_components/iron-selector/iron-selector.html Failed to load resource: the server responded with a status of 404 (Not Found) http://localhost:3000/bower_components/paper-drawer-panel/paper-drawer-panel.html Failed to load resource: the server responded with a status of 404 (Not Found) http://localhost:3000/bower_components/paper-header-panel/paper-header-panel.html Failed to load resource: the server responded with a status of 404 (Not Found) http://localhost:3000/bower_components/paper-icon-button/paper-icon-button.html Failed to load resource: the server responded with a status of 404 (Not Found) http://localhost:3000/bower_components/paper-item/paper-item.html Failed to load resource: the server responded with a status of 404 (Not Found) http://localhost:3000/bower_components/paper-material/paper-material.html Failed to load resource: the server responded with a status of 404 (Not Found) http://localhost:3000/bower_components/paper-menu/paper-menu.html Failed to load resource: the server responded with a status of 404 (Not Found) http://localhost:3000/bower_components/paper-styles/paper-styles-classes.html Failed to load resource: the server responded with a status of 404 (Not Found) http://localhost:3000/bower_components/paper-toast/paper-toast.html Failed to load resource: the server responded with a status of 404 (Not Found) http://localhost:3000/bower_components/paper-toolbar/paper-toolbar.html Failed to load resource: the server responded with a status of 404 (Not Found) http://localhost:3000/bower_components/platinum-sw/platinum-sw-cache.html Failed to load resource: the server responded with a status of 404 (Not Found) http://localhost:3000/bower_components/platinum-sw/platinum-sw-register.html Failed to load resource: the server responded with a status of 404 (Not Found) my-greeting.html:32 Uncaught ReferenceError: Polymer is not defined my-list.html:27 Uncaught ReferenceError: Polymer is not defined http://localhost:3000/bower_components/page/page.js Failed to load resource: the server responded with a status of 404 (Not Found)

Any help would be appreciated. Thank you

4

4 Answers

3
votes

It looks like you have to install the dependencies of your project:

npm install -g gulp bower && npm install && bower install

Check the "Install dependencies" section on https://github.com/polymerelements/polymer-starter-kit.

0
votes

Looks like your server isn't running in the right directory.

0
votes

My answer is based on the exact issue I had with the starter kit: brings up a blank page with the title only. You need to install the web components with bower. Change directory to your app root then, in terminal :

bower install --save Polymer/polymer#^1.0.0

I'd also suggests that you install Polymer with Yeoman, if you have not done so.

0
votes

In the index.html file at line 70,

* If you intend to serve your app from a non-root path (e.g., with URLs
* like `my.domain/my-app/` and `my.domain/my-app/view1`), edit this line
* to indicate the path from which you'll be serving, including leading
* and trailing slashes (e.g., `/my-app/`).
*/

window.Polymer = {rootPath: '/'};

To fix the problem, simply point the rootPath to the correct directory your app is in, for example

window.Polymer = {rootPath: '/firstapp/'};