Не удается создать файл moor_database.g.dart - PullRequest
0 голосов
/ 02 марта 2020

каждый раз, когда я запускаю команду «build_runner watch», я получаю сообщение об ошибке, что 0/3 действия выполнены, у меня есть все зависимости с их последним обновлением, я пытался найти проблему, но пока не смог найти решение… все еще ищу и я надеюсь, что смогу найти помощь здесь:


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

Ответы [ 2 ]

1 голос
/ 02 марта 2020

вы пытались удалить moor_database.g.dart и затем снова запустить "build_runner watch"?

0 голосов
/ 04 марта 2020

Можете ли вы попробовать запустить эту команду, flutter packages pub, запустить build_runner build --delete-конфликтаting-output

...