Dart confusing TYPE error
Asked Answered
C

1

6

I am building a web application using dart with web_ui.

Everything was working fine until i added the web_ui pub, and now, when I am trying to run a build.dart file I get an error:

Uncaught Error: type 'AttributeName' is not a subtype of type 'String' of 'name'.

What does this mean?

From what I understand, this means there is somewhere an instance named 'name' of class 'AttributeName' that is extending 'String' class.

I searched my entire project and there is nowhere a class named 'AttributeName', nowhere an instance of 'name'.

I have the latest Dart editor and SDK:

Dart Editor version 0.4.7_r21658
Dart SDK version 0.4.7.5_r21658

EDIT: this is my build.dart file:

import 'package:web_ui/component_build.dart';
import 'dart:io';

void main() {
  build(new Options().arguments, ['web/menyplattan.html']);
}

Also, i updated all the pubs

Carolinacaroline answered 19/4, 2013 at 13:35 Comment(4)
Can you post the contents of your build.dart file? And also the file that is being built?Broadbill
If you started your project before updating to the latest Dart Editor, have you run Tools -> Pub Update while in your project?Rosanne
i updated my original question with data you asked forCarolinacaroline
duplicate of https://mcmap.net/q/1918348/-dart-webui-build-error ??Sensuality
B
1

This message looks like web_ui is failing a type check.

The similar SO question MarioP links to has a stacktrace showing this message coming from within the web ui library itself.

Do you have an xmlns attribute in your html? Have a look at this web-ui issue.

AttributeName is defined within the html5lib library. Perhaps web-ui is expecting a newer version of this library but getting an older one. Make sure you've done a pub install. You can also try deleting your packages folder and doing a fresh pub install.

This could be caused by out-of-date packages, but it could also be a bug in web-ui. See if you can get a stacktrace and file a bug report, or post it on the web-ui mailing list.

Boughton answered 1/5, 2013 at 4:58 Comment(0)

© 2022 - 2024 — McMap. All rights reserved.