4

The offending line in my index.html file reads

<script src="main.dart" type="application/dart"></script>

The error report is:

Build error:
Transform polymer (PolymerBootstrapTransformer) on myproj_frontend|web/index.html threw error: Invalid argument(s): Illegal character in path
dart:core/uri.dart 855                               Uri._checkWindowsPathReservedCharacters
dart:core/uri.dart 956                               Uri._makeWindowsFileUrl

The entire path to the project is

D:\Projects\MyProj\MyProj_Project

I'm building from command line on Windows 7 using Dart VM version: 1.16.0

I honestly have no idea how to continue diagnosing or fixing this. Any help would be greatly appreciated.

S. J.
  • 1,106
  • 1
  • 10
  • 23
  • Hard to tell with this information. Seems to be caused by some of your file names or the path you are using. Can you please add the full path to your project and the directories and file names in your project to your question (maybe a screenshot of the Windows explorer). Images can be added directly to the question. – Günter Zöchbauer Apr 28 '16 at 06:54
  • I think its a bug in one of the latest versions of the analyzer package. It only happens for me after I run pub upgrade – Fox32 Apr 28 '16 at 11:27
  • `D` is a local drive or a network drive? – Günter Zöchbauer Apr 28 '16 at 13:29
  • @GünterZöchbauer The entire path to the project is D:\Projects\MyProj\MyProj_Project. D: is a local HDD, not network. Here's what the MyProj_Project folder contains: http://s32.postimg.org/3ku184zo5/directory.gif – S. J. Apr 28 '16 at 13:31
  • @Fox32 I'm brand new to Dart, pub, etc etc. Is there a way to roll back to a version that you think doesn't have this bug so I can test? – S. J. Apr 28 '16 at 13:32
  • @Luth You could try to pin an older version of analyzer (maybe <0.27.0) in your pubspec.yaml – Fox32 Apr 28 '16 at 14:56
  • @Fox32 You were right. They must've introduced a Windows build but in 0.27.X, and rolling back fixed this up right. If you want to post that as a non-comment, I'll mark you as having properly answered it. :) – S. J. Apr 28 '16 at 15:21

2 Answers2

5

I have the same problem. Looks like it is an issue with the analyzer package 0.27.0 and later.

I solved it by pinning the version in pubspec.yaml to <0.27.0.

Fox32
  • 13,126
  • 9
  • 50
  • 71
3

I found that analyzer 0.27.2 is ok, but analyzer 0.27.3 will cause exception “Invalid argument(s): Illegal character in path” on my Win 10.

ps. I use Dart 1.16.0

Luke Chi
  • 91
  • 4