[PR #624] [MERGED] fix: flutter build error - The getter 'imports' isn't defined for the class 'PrefixElement' #4247

Closed
opened 2026-03-23 21:36:57 +00:00 by mirror · 0 comments
Owner

📋 Pull Request Information

Original PR: https://github.com/AppFlowy-IO/AppFlowy/pull/624
Author: @mastergyp
Created: 7/18/2022
Status: Merged
Merged: 7/23/2022
Merged by: @appflowy

Base: mainHead: fix_flutter_build_error


📝 Commits (1)

  • ab414b7 fix: unable to run build_runner - The getter 'imports' isn't defined for the class 'PrefixElement'

📊 Changes

1 file changed (+3 additions, -0 deletions)

View changed files

📝 frontend/app_flowy/pubspec.yaml (+3 -0)

📄 Description

when I launch build_runner, it displays this :

*  Executing task: flutter pub run build_runner build --delete-conflicting-outputs 

[INFO] Generating build script...
[INFO] Generating build script completed, took 414ms

[INFO] Precompiling build script......
[WARNING] ../../../../../development/flutter/.pub-cache/hosted/pub.flutter-io.cn/freezed-2.0.4/lib/src/tools/type.dart:27:16: Error: The getter 'imports' isn't defined for the class 'PrefixElement'.
 - 'PrefixElement' is from 'package:analyzer/dart/element/element.dart' ('../../../../../development/flutter/.pub-cache/hosted/pub.flutter-io.cn/analyzer-3.4.1/lib/dart/element/element.dart').
Try correcting the name to the name of an existing getter, or defining a getter or field named 'imports'.
      return e.imports.any((l) {
               ^^^^^^^
[INFO] Precompiling build script... completed, took 4.8s

[SEVERE] Failed to precompile build script .dart_tool/build/entrypoint/build.dart.
This is likely caused by a misconfigured builder definition.

pub finished with exit code 78```

Request to update generator analyser to analyser ^4.x 

---

<sub>🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.</sub>
## 📋 Pull Request Information **Original PR:** https://github.com/AppFlowy-IO/AppFlowy/pull/624 **Author:** [@mastergyp](https://github.com/mastergyp) **Created:** 7/18/2022 **Status:** ✅ Merged **Merged:** 7/23/2022 **Merged by:** [@appflowy](https://github.com/appflowy) **Base:** `main` ← **Head:** `fix_flutter_build_error` --- ### 📝 Commits (1) - [`ab414b7`](https://github.com/AppFlowy-IO/AppFlowy/commit/ab414b77f6cd55381e7d4f00fb58915c739735e1) fix: unable to run build_runner - The getter 'imports' isn't defined for the class 'PrefixElement' ### 📊 Changes **1 file changed** (+3 additions, -0 deletions) <details> <summary>View changed files</summary> 📝 `frontend/app_flowy/pubspec.yaml` (+3 -0) </details> ### 📄 Description when I launch build_runner, it displays this : ``` * Executing task: flutter pub run build_runner build --delete-conflicting-outputs [INFO] Generating build script... [INFO] Generating build script completed, took 414ms [INFO] Precompiling build script...... [WARNING] ../../../../../development/flutter/.pub-cache/hosted/pub.flutter-io.cn/freezed-2.0.4/lib/src/tools/type.dart:27:16: Error: The getter 'imports' isn't defined for the class 'PrefixElement'. - 'PrefixElement' is from 'package:analyzer/dart/element/element.dart' ('../../../../../development/flutter/.pub-cache/hosted/pub.flutter-io.cn/analyzer-3.4.1/lib/dart/element/element.dart'). Try correcting the name to the name of an existing getter, or defining a getter or field named 'imports'. return e.imports.any((l) { ^^^^^^^ [INFO] Precompiling build script... completed, took 4.8s [SEVERE] Failed to precompile build script .dart_tool/build/entrypoint/build.dart. This is likely caused by a misconfigured builder definition. pub finished with exit code 78``` Request to update generator analyser to analyser ^4.x --- <sub>🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.</sub>
mirror 2026-03-23 21:36:57 +00:00
Sign in to join this conversation.
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
AppFlowy-IO/AppFlowy#4247
No description provided.