webcomponents.js失败,错误404 [英] webcomponents.js fails with error 404

查看:557
本文介绍了webcomponents.js失败,错误404的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我在我的控制台中看到异常,当运行我的dart应用程序与webcomponents.js相关
一切正常运行,我应该忽略这个异常?

I'm seeing exceptions in my console when running my dart app related to webcomponents.js Everything is running as expected, should I ignore this exception?

Failed to load resource: the server responded with a status of 404 (Not Found)
  http://localhost:8080/packages/web_components/webcomponents.js

pubspec.yaml:

pubspec.yaml:

name: alm
description: alm
dependencies:
  browser: any
  # bootjack: any
  polymer: ">0.15.3"
  paper_elements: any
transformers:
- polymer:
    entry_points:
      - web/index.html

$ b b

index.html

index.html

<!DOCTYPE html>
<html>
<head>
  <meta charset="utf-8">
  <meta name="viewport" content="width=device-width, initial-scale=1.0">
  <title>Test</title>
  <!--
  <link rel="stylesheet" href="packages/bootjack/css/bootstrap.min.css">
  -->
  <link rel="import" href="packages/polymer/polymer.html">
  <link rel="import" href="packages/paper_elements/paper_button.html">
  <link rel="import" href="packages/paper_elements/paper_input.html">  
</head>
<body unresolved>
  <script type="application/dart" src="index.dart"></script>

  <div id="more-buttons">
    <paper-button raised class="colored">colored</paper-button>
    <paper-button raised disabled>disabled</paper-button>
  </div>

  <script src="packages/browser/dart.js"></script>
</body>
</html>

index.dart:

index.dart:

import 'dart:html';
import 'package:polymer/polymer.dart';
//import 'package:bootjack/bootjack.dart';
import 'package:paper_elements/paper_button.dart';
import 'package:paper_elements/paper_input.dart';

void main() {

  print("begin");

  initPolymer().run(() {
    Polymer.onReady.then((_) {

      DivElement div = querySelector("#more-buttons");

      div.appendHtml("123");

      PaperButton y = new PaperButton();
      y.text = "KOTS";
      y.raised = true;
      div.append(y);

      PaperInput x = new PaperInput();
      x.value = "KOTS";
      div.append(x);

    });
  });

  print("end");
}


推荐答案

Fox32建议我删除〜/ .pub文件夹,做一个酒吧再次。
在这之后,我跑进了pub的整个时间内存不足。

Fox32 suggested that I delete my ~/.pub folder and do a pub get again. After doing that, I ran into pub running out of memory the whole time.

Timo D建议我也删除〜/ .pub-cache 。

Timo D suggested I also delete ~/.pub-cache which I did. After another pub get and pub serve, it's running perfectly.

感谢Timo D和Fox32!

Thanks Timo D and Fox32 !!

这篇关于webcomponents.js失败,错误404的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆