IntelliJ suddenly returning 403s and 404s for Dart

2019-08-09 05:38发布

问题:

I'm developing a Dart client-side application using IntelliJ IDEA 13. Yesterday, I upgraded my Polymer.dart to 0.10.0-pre.2. Since then, things have been kind of screwy. I've downgraded by to 0.9.5, as I don't need to new features any more, but I keep hitting this same problem. When I launch my app in Dartium from IntelliJ, I get the following errors:

GET http://localhost:63342/webatara/web/packages/observe/src/bindable.dart 404 (Not Found)
An error occurred loading file: package:observe/src/bindable.dart
GET http://localhost:63342/webatara/web/packages/observe/src/observer_transform.dart 404 (Not Found)
An error occurred loading file: package:observe/src/observer_transform.dart
GET http://localhost:63342/webatara/web/packages/template_binding/src/mustache_tokens.dart 404 (Not Found)
An error occurred loading file: package:template_binding/src/mustache_tokens.dart
GET http://localhost:63342/webatara/web/packages/smoke/smoke.dart 404 (Not Found)
An error occurred loading file: package:smoke/smoke.dart

I don't know what's referencing these things.

$ grep -r bindable.dart packages web ~/.pub-cache
$

I've tried deleting ./packages, ./pubspec.lock and ~/.pub-cache, but I just get the same problem. I've tried upgrading to 13.1 EAP and updating the Dart pluging, but that didn't help. Here's my pubspec.yaml:

name: webatara
description: A sample Polymer application
dependencies:
  barback: any
  browser: any
  polymer: any
transformers:
- polymer:
    entry_points: web/index.html
threadsafe: yes

And the resulting pubspec.lock:

# Generated by pub
# See http://pub.dartlang.org/doc/glossary.html#lockfile
packages:
  analyzer:
    description: analyzer
    source: hosted
    version: "0.10.5"
  args:
    description: args
    source: hosted
    version: "0.9.0"
  barback:
    description: barback
    source: hosted
    version: "0.11.1"
  browser:
    description: browser
    source: hosted
    version: "0.9.1"
  collection:
    description: collection
    source: hosted
    version: "0.9.1"
  custom_element:
    description: custom_element
    source: hosted
    version: "0.9.2"
  html5lib:
    description: html5lib
    source: hosted
    version: "0.9.2"
  html_import:
    description: html_import
    source: hosted
    version: "0.9.0"
  logging:
    description: logging
    source: hosted
    version: "0.9.1+1"
  mutation_observer:
    description: mutation_observer
    source: hosted
    version: "0.9.0"
  observe:
    description: observe
    source: hosted
    version: "0.9.3"
  path:
    description: path
    source: hosted
    version: "1.0.0"
  polymer:
    description: polymer
    source: hosted
    version: "0.9.5"
  polymer_expressions:
    description: polymer_expressions
    source: hosted
    version: "0.9.1"
  shadow_dom:
    description: shadow_dom
    source: hosted
    version: "0.9.2"
  source_maps:
    description: source_maps
    source: hosted
    version: "0.9.0"
  stack_trace:
    description: stack_trace
    source: hosted
    version: "0.9.2"
  template_binding:
    description: template_binding
    source: hosted
    version: "0.9.1"
  unmodifiable_collection:
    description: unmodifiable_collection
    source: hosted
    version: "0.9.2+1"
  utf:
    description: utf
    source: hosted
    version: "0.9.0"
  yaml:
    description: yaml
    source: hosted
    version: "0.9.0"