2

After running pub serve, I was greeted with an unusual error message:

Loading source assets...
Loading polymer, angular2 and dart_to_js_script_rewriter transformers...
Serving group_maker web on http://localhost:8080
Build error:
Transform WebComponents on group_maker|web/index.html threw error:

    Invalid argument(s): Illegal character in path
dart:core/uri.dart 861                               Uri._checkWindowsPathReservedCharacters
dart:core/uri.dart 962                               Uri._makeWindowsFileUrl
dart:core/uri.dart 744                               Uri.Uri.file
package:analyzer/src/string_source.dart 30           StringSource.StringSource
package:dart_style/src/dart_formatter.dart 81        DartFormatter.formatSource
package:dart_style/src/dart_formatter.dart 62        DartFormatter.format
package:initialize/transformer.dart 340              _BootstrapFileBuilder._buildNewEntryPoint
package:initialize/transformer.dart 225              _BootstrapFileBuilder.run
package:initialize/transformer.dart 37               generateBootstrapFile
package:web_components/build/web_components.dart 32  generateWebComponentsBootstrap
package:web_components/build/web_components.dart 82  WebComponentsTransformer.apply.<fn>.<fn>
dart:async/zone.dart 1204                            _RootZone.runUnary
dart:async/future_impl.dart 131                      _FutureListener.handleValue
dart:async/future_impl.dart 637                      _Future._propagateToListeners.handleValueCallback
dart:async/future_impl.dart 667                      _Future._propagateToListeners
dart:async/future_impl.dart 477                      _Future._completeWithValue
dart:async/future_impl.dart 528                      _Future._asyncComplete.<fn>
dart:async/schedule_microtask.dart 41                _microtaskLoop
dart:async/schedule_microtask.dart 50                _startMicrotaskLoop
dart:isolate-patch/isolate_patch.dart 96             _runPendingImmediateCallback
dart:isolate-patch/isolate_patch.dart 149            _RawReceivePortImpl._handleMessage

dart:core                                            Uri.Uri.file
package:analyzer/src/string_source.dart 30           StringSource.StringSource
package:dart_style/src/dart_formatter.dart 81        DartFormatter.formatSource
package:dart_style/src/dart_formatter.dart 62        DartFormatter.format
package:initialize/transformer.dart 340              _BootstrapFileBuilder._buildNewEntryPoint
package:initialize/transformer.dart 225              _BootstrapFileBuilder.run
package:initialize/transformer.dart 37               generateBootstrapFile
package:web_components/build/web_components.dart 32  generateWebComponentsBootstrap
package:web_components/build/web_components.dart 82  WebComponentsTransformer.apply.<fn>.<fn>
Build completed with 1 errors.

For reference, here are my index.html and main.dart files:

index.html:

<!DOCTYPE html>
<html lang="en-US">
    <head>
        <meta charset="utf-8">
        <meta http-equiv="x-ua-compatible" content="ie=edge">
        <meta name="viewport" content="width=device-width, initial-scale=1">
        <title>Group Maker</title>

        <base href="/">

        <link href="https://maxcdn.bootstrapcdn.com/bootstrap/4.0.0-alpha.2/css/bootstrap.min.css" rel="stylesheet"  integrity="sha384-y3tfxAZXuh4HwSYylfB+J125MxIs6mR5FOHamPBG064zB+AFeWH94NdvaCBm8qnd" crossorigin="anonymous">
        <link href="styles.css" rel="stylesheet">

        <meta name="coverage" content="Worldwide">
        <meta name="google" content="nositelinkssearchbox">
        <meta name="googlebot" content="index,follow">
        <meta name="msapplication-TileColor" content="#FFFFFF">
        <meta name="msapplication-TileImage" content="/ms-icon-144x144.png">
        <meta name="rating" content="General">
        <meta name="theme-color" content="#ffffff">

        <link href="icons/apple-icon-57x57.png" rel="apple-touch-icon" sizes="57x57">
        <link href="icons/apple-icon-60x60.png" rel="apple-touch-icon" sizes="60x60">
        <link href="icons/apple-icon-72x72.png" rel="apple-touch-icon" sizes="72x72">
        <link href="icons/apple-icon-76x76.png" rel="apple-touch-icon" sizes="76x76">
        <link href="icons/apple-icon-114x114.png" rel="apple-touch-icon" sizes="114x114">
        <link href="icons/apple-icon-120x120.png" rel="apple-touch-icon" sizes="120x120">
        <link href="icons/apple-icon-144x144.png" rel="apple-touch-icon" sizes="144x144">
        <link href="icons/apple-icon-152x152.png" rel="apple-touch-icon" sizes="152x152">
        <link href="icons/apple-icon-180x180.png" rel="apple-touch-icon" sizes="180x180">
        <link href="icons/android-icon-192x192.png" rel="icon" type="image/png" sizes="192x192">
        <link href="icons/favicon-32x32.png" rel="icon" type="image/png" sizes="32x32">
        <link href="icons/favicon-96x96.png" rel="icon" type="image/png" sizes="96x96">
        <link href="icons/favicon-16x16.png" rel="icon" type="image/png" sizes="16x16">
        <link rel="manifest" href="icons/manifest.json">

        <!--[if lt IE 9]>
            <script src="https://oss.maxcdn.com/html5shiv/3.7.2/html5shiv.min.js"></script>
            <script src="https://oss.maxcdn.com/respond/1.4.2/respond.min.js"></script>
        <![endif]-->

        <script src="https://code.jquery.com/jquery-3.0.0.min.js" integrity="sha256-JmvOoLtYsmqlsWxa7mDSLMwa6dZ9rrIdtrrVYRnDRH0=" crossorigin="anonymous"></script>
        <script src="https://maxcdn.bootstrapcdn.com/bootstrap/4.0.0-alpha.2/js/bootstrap.min.js" integrity="sha384-vZ2WRJMwsjRMW/8U7i6PWi6AlO1L79snBrmgiDpgIWJ82z8eA5lenwvxbMV1PAh7" crossorigin="anonymous"></script>
        <script defer src="main.dart" type="application/dart"></script>
        <script async src="packages/browser/dart.js"></script>
    </head>
    <body unresolved>
        <h1>Hello, world!</h1>
    </body>
</html>

main.dart:

import 'package:angular2/platform/browser.dart';
import 'package:polymer/polymer.dart';

main() async {
    await initPolymer();
}

Can anyone make heads or tails of this?

Zesty Memes
  • 442
  • 2
  • 11
  • 2
    Looks similar to http://stackoverflow.com/questions/36906719/dart-invalid-arguments-illegal-character-in-path-when-building-on-windows. Can you please check the analyzer version you are using? – Günter Zöchbauer Jun 20 '16 at 07:02
  • @GünterZöchbauer I saw that post, and have since lowered my `analyzer` package versioning to `<0.27.3`; but, I'd like to think that there must be some better way about this--or, at the least, an explanation as to why it is. – Zesty Memes Jun 21 '16 at 10:36
  • The analyzer package is moving very fast and therefore packages that have `analyzer` as dependency have very narrow version constraint on it because every analyzer update could contain breaking changes. Packages that aren't updated that often or don't pay to much attention that they support the latest versions of everything pull down the versions for all your direct and transitive dependencies that have a shared depencency. This is why it often takes quite some while until one is able to get most recent versions of everything. – Günter Zöchbauer Jun 21 '16 at 11:04
  • 2
    If you don't publish to pub you can try to force a newer analyzer version with `dependency_overrides`. – Günter Zöchbauer Jun 21 '16 at 11:04
  • @GünterZöchbauer Alright, thanks for the advice. – Zesty Memes Jun 21 '16 at 11:25
  • The analyzer issue is odd, but it hasn't caused me any problems once I setup my .yaml file with a previous version. – BeatingToADifferentRobot Jun 27 '16 at 19:02

0 Answers0