Dart:"Invalid argument(s): Illegal character in path" 在 Windows 上构建时
Dart: "Invalid argument(s): Illegal character in path" when building on Windows
我的 index.html 文件中有问题的行是
<script src="main.dart" type="application/dart"></script>
报错为:
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
项目的完整路径是
D:\Projects\MyProj\MyProj_Project
我在 Windows 7 上使用 Dart VM 版本从命令行构建:1.16.0
老实说,我不知道如何继续诊断或解决这个问题。 任何帮助将不胜感激。
我也遇到了同样的问题。看起来这是 analyzer
包 0.27.0
及更高版本的问题。
我通过将 pubspec.yaml
中的版本固定到 <0.27.0
来解决它。
我发现 analyzer 0.27.2 没问题,但是 analyzer 0.27.3 在我的 Win 10 上会导致异常“Invalid argument(s): Illegal character in path”
ps。我使用 Dart 1.16.0
我的 index.html 文件中有问题的行是
<script src="main.dart" type="application/dart"></script>
报错为:
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
项目的完整路径是
D:\Projects\MyProj\MyProj_Project
我在 Windows 7 上使用 Dart VM 版本从命令行构建:1.16.0
老实说,我不知道如何继续诊断或解决这个问题。 任何帮助将不胜感激。
我也遇到了同样的问题。看起来这是 analyzer
包 0.27.0
及更高版本的问题。
我通过将 pubspec.yaml
中的版本固定到 <0.27.0
来解决它。
我发现 analyzer 0.27.2 没问题,但是 analyzer 0.27.3 在我的 Win 10 上会导致异常“Invalid argument(s): Illegal character in path”
ps。我使用 Dart 1.16.0