Polymer-cli をインストールして以来、問題に直面しています。開発中にコンポーネントを提供できません。コンポーネントを操作するには、URL を再マッピングして独自の Node.js サーバーを作成する必要があります。しかし、ドキュメンテーション ページは、独自のツールでこの作業を既に行っていることを明確に示唆しています。
私がしたこと
- Polymer-cli を使用してコンポーネントを作成する
polymer init
- を使用してコンポーネントを提供します
polymer serve
- 結果は予期せず、次のエラーが発生しました:
ポリマー バージョン: 0.18.0-pre.15
Ubuntu 16.04.2 LTS x64
実行中polymer serve
info: Files in this directory are available under the following URLs
applications: http://127.0.0.1:8081
reusable components: http://127.0.0.1:8081/components/test-element/
A) 開こうとするとlocalhost:8081
GET http://localhost:8081/webcomponentsjs/webcomponents-loader.js 404 (Not Found)
GET http://localhost:8081/iron-component-page/iron-component-page.html 404 (Not Found)
B) `localhost:8081/components/test-element/demo/ を開こうとすると
URLはにリダイレクトしますhttp://localhost:8081/home/user-name/project-root/test-element/
プロジェクト ルート ディレクトリのインデックス ページが提供されます。
GET http://localhost:8081/home/user-name/project-root/webcomponentsjs/webcomponents-loader.js
GET http://localhost:8081/home/user-name/project-root/iron-component-page/iron-component-page.html 404 (Not Found)