[英]Target dart2js failed No such file or directory
I am running into an issue where on GH Actions my dart build is failing with lots of lines like我遇到了一个问题,在 GH Actions 上我的 dart 构建失败了很多行,比如
Compiling lib/main.dart for the Web...
Target dart2js failed: Exception: lib/api/file_a.dart:00:0:
Error: Error when reading 'lib/models/file_b.dart': Error reading 'lib/models/file_b.dart' (No such file or directory)
import "/models/file_b.dart";
Posted to answer right away in case it helps someone else.发布后立即回答,以防对其他人有帮助。
My issue was because I changed the capitalization of files in git. from /File.dart
to /file.dart
.我的问题是因为我将 git 中文件的大小写从/File.dart
为/file.dart
。
The way to fix this was for each import unable to be found to git mv /File.dart /file.dart
解决此问题的方法是无法找到每个导入到git mv /File.dart /file.dart
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.