Dart:“参数无效:路径中的非法字符”当在Windows上构建时 [英] Dart: "Invalid argument(s): Illegal character in path" when building on Windows

查看:199
本文介绍了Dart:“参数无效:路径中的非法字符”当在Windows上构建时的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我的index.html文件中的违规行显示为

The offending line in my index.html file reads

<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

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.

推荐答案

我有同样的问题。看起来它是分析器 0.27.0 和以后的问题。

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

我通过将 pubspec.yaml 中的版本固定到< 0.27.0

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

这篇关于Dart:“参数无效:路径中的非法字符”当在Windows上构建时的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆