Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Dart: "Invalid argument(s): Illegal character in path" when building on Windows

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.

like image 308
S. J. Avatar asked Feb 08 '23 03:02

S. J.


1 Answers

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.

like image 135
Fox32 Avatar answered May 01 '23 05:05

Fox32