Can't create moor_database.g.dart file

巧了我就是萌 提交于 2020-05-17 06:56:32

问题


every time i run the "build_runner watch" command i get an error that 0/3 actions completed i have all the dependencies with their last update i tried to search the problem but couldn't find any solution yet.. still searching and i hope if i can find some help here:


flutter packages pub run build_runner watch
[INFO] Generating build script...
[INFO] Generating build script completed, took 395ms

[INFO] Creating build script snapshot......
[INFO] Creating build script snapshot... completed, took 13.4s

[INFO] Setting up file watchers...
[INFO] Setting up file watchers completed, took 12ms

[INFO] Waiting for all file watchers to be ready...
[INFO] Waiting for all file watchers to be ready completed, took 108ms

[INFO] Initializing inputs
[INFO] Building new asset graph...
[INFO] Building new asset graph completed, took 1.3s

[INFO] Checking for unexpected pre-existing outputs....
[INFO] Checking for unexpected pre-existing outputs. completed, took 2ms

[INFO] Running build...
[INFO] 1.1s elapsed, 0/3 actions completed.
[INFO] 2.1s elapsed, 0/3 actions completed.
[INFO] 5.2s elapsed, 0/3 actions completed.
[INFO] 6.3s elapsed, 0/3 actions completed.
[INFO] 11.1s elapsed, 0/3 actions completed.
[INFO] 12.3s elapsed, 0/3 actions completed.
[SEVERE] moor_generator:moor_generator on lib/db/db.dart:
Error running MoorGenerator
NoSuchMethodError: The getter 'typeConverter' was called on null.
Receiver: null
Tried calling: typeConverter
[SEVERE] moor_generator:moor_generator on lib/db/db.dart:
Error running DaoGenerator
NoSuchMethodError: The getter 'typeConverter' was called on null.
Receiver: null
Tried calling: typeConverter
[INFO] Running build completed, took 12.6s

[INFO] Caching finalized dependency graph...
[INFO] Caching finalized dependency graph completed, took 95ms

[SEVERE] Failed after 12.7s

回答1:


Can you try running this command, flutter packages pub run build_runner build --delete-conflicting-outputs




回答2:


did you try deleting moor_database.g.dart and then running "build_runner watch" again?



来源:https://stackoverflow.com/questions/60491042/cant-create-moor-database-g-dart-file

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!