Flutterando / slidy

CLI package manager and template for Flutter
https://pub.dev/packages/slidy
Apache License 2.0
806 stars 101 forks source link

'Null' is not a subtype of type 'Object' #260

Closed evertonschuster closed 3 years ago

evertonschuster commented 3 years ago

Boa tarde, tudo bem com vocês? a maioria dos comandos do slidy estão dando erro de null

comando 'install' que inclusive está rodando duas vezes

D:\workspace.whn\whn.front.buyer>slidy install mockito dio modular Unhandled exception: type 'Null' is not a subtype of type 'Object'

0 wrapAsYamlNode (package:slidy/src/modules/yaml_edit/src/wrap.dart:49:29)

1 wrapAsYamlNode (package:slidy/src/modules/yaml_edit/src/wrap.dart:62:7)

2 new YamlMapWrap (package:slidy/src/modules/yaml_edit/src/wrap.dart:121:28)

3 wrapAsYamlNode (package:slidy/src/modules/yaml_edit/src/wrap.dart:68:12)

4 updatedYamlMap (package:slidy/src/modules/yaml_edit/src/wrap.dart:34:18)

5 YamlEditor._deepModify (package:slidy/src/modules/yaml_edit/src/editor.dart:622:14)

6 YamlEditor._performEdit (package:slidy/src/modules/yaml_edit/src/editor.dart:568:26)

7 YamlEditor.update (package:slidy/src/modules/yaml_edit/src/editor.dart:276:14)

8 YamlServiceImpl.update (package:slidy/src/core/services/yaml_service_impl.dart:46:16)

9 PackageInstalationRepositoryImpl.install (package:slidy/src/modules/package_instalation/infra/repositories/package_instalation_repository.dart:25:15)

#10 Install.call (package:slidy/src/modules/package_instalation/domain/usecases/install.dart:15:12) #11 InstallCommand.run (file:///C:/Users/Ever-PC/AppData/Local/Pub/Cache/hosted/pub.dartlang.org/slidy-3.2.2+1/bin/commands/install_command.dart:27:24) #12 CommandRunner.runCommand (package:args/command_runner.dart:209:13) #13 main (file:///C:/Users/Ever-PC/AppData/Local/Pub/Cache/hosted/pub.dartlang.org/slidy-3.2.2+1/bin/main.dart:22:7) Unhandled exception: type 'Null' is not a subtype of type 'Object' #0 wrapAsYamlNode (package:slidy/src/modules/yaml_edit/src/wrap.dart:49:29) #1 wrapAsYamlNode (package:slidy/src/modules/yaml_edit/src/wrap.dart:62:7) #2 new YamlMapWrap (package:slidy/src/modules/yaml_edit/src/wrap.dart:121:28) #3 wrapAsYamlNode (package:slidy/src/modules/yaml_edit/src/wrap.dart:68:12) #4 updatedYamlMap (package:slidy/src/modules/yaml_edit/src/wrap.dart:34:18) #5 YamlEditor._deepModify (package:slidy/src/modules/yaml_edit/src/editor.dart:622:14) #6 YamlEditor._performEdit (package:slidy/src/modules/yaml_edit/src/editor.dart:568:26) #7 YamlEditor.update (package:slidy/src/modules/yaml_edit/src/editor.dart:276:14) #8 YamlServiceImpl.update (package:slidy/src/core/services/yaml_service_impl.dart:46:16) #9 PackageInstalationRepositoryImpl.install (package:slidy/src/modules/package_instalation/infra/repositories/package_instalation_repository.dart:25:15) #10 Install.call (package:slidy/src/modules/package_instalation/domain/usecases/install.dart:15:12) #11 InstallCommand.run (file:///C:/Users/Ever-PC/AppData/Local/Pub/Cache/hosted/pub.dartlang.org/slidy-3.2.2+1/bin/commands/install_command.dart:27:24) #12 CommandRunner.runCommand (package:args/command_runner.dart:209:13) #13 main (file:///C:/Users/Ever-PC/AppData/Local/Pub/Cache/hosted/pub.dartlang.org/slidy-3.2.2+1/bin/main.dart:22:7) Slidy version ███████╗██╗ ██╗██████╗ ██╗ ██╗ ██████╗██╗ ██╗ ██╔════╝██║ ██║██╔══██╗╚██╗ ██╔╝ ██╔════╝██║ ██║ ███████╗██║ ██║██║ ██║ ╚████╔╝ ██║ ██║ ██║ ╚════██║██║ ██║██║ ██║ ╚██╔╝ ██║ ██║ ██║ ███████║███████╗██║██████╔╝ ██║ ╚██████╗███████╗██║ ╚══════╝╚══════╝╚═╝╚═════╝ ╚═╝ ╚═════╝╚══════╝╚═╝ CLI package manager and template for Flutter Slidy version: 3.2.2 dart version D:\workspace.whn\whn.front.buyer>dart --version Dart SDK version: 2.13.4 (stable) (Wed Jun 23 13:08:41 2021 +0200) on "windows_x64"
andremeireles commented 3 years ago

Olá @evertonschuster !

Eu fiz um teste na minha instalação e isso sempre acontece quando um dos pacotes do pubspec.yaml não possui uma versão explícita. O build_runner: por exemplo. Colocando uma versão explicitamente nos pacotes, o comando de instalar volta a funcionar. Faça a verificação e me diga se resolveu.

evertonschuster commented 3 years ago

Olá @andremeireles, funcionou !!!

andremeireles commented 3 years ago

Olá @andremeireles, funcionou !!!

Que ótimo.