step 3 is not running successfully.
AlijonovMukhammaddiyor opened this issue · 5 comments
I am cloning the project and running flutter pub get
and then running flutter packages pub run build_runner watch
but it is failing.
[INFO] Generating build script...
[INFO] Generating build script completed, took 220ms
[INFO] Creating build script snapshot......
[WARNING] stderr: Info: Compiling without sound null safety!
[WARNING] stderr: Dart 3 will only support sound null safety, see https://dart.dev/null-safety
[INFO] Creating build script snapshot... completed, took 7.0s
[INFO] Setting up file watchers...
[INFO] Setting up file watchers completed, took 10ms
[INFO] Waiting for all file watchers to be ready...
[INFO] Waiting for all file watchers to be ready completed, took 200ms
You have hit a bug in build_runner
Please file an issue with reproduction steps at https://github.com/dart-lang/build/issues
AssetNotFoundException: boilerplate|.packages
package:build_runner_core/src/asset/file_based.dart 135:18 _fileForOrThrow.<fn>
dart:async _CustomZone.runUnary
package:build_runner/src/generate/watch_impl.dart 329:20 WatchImpl._run.<fn>
I have tried flutter clean
, deleting .dart_tools
folder but they did not change anything. I have also tried flutter upgrade
and flutter packages upgrade
.
same problem
name: boilerplate
description: A flutter boilerplate project created using MobX and Provider.
version: 1.0.0+1
environment:
sdk: ">=2.15.0 <3.7.7"
dependencies:
flutter:
sdk: flutter
flutter_localizations:
sdk: flutter
flutter_cupertino_localizations: ^1.0.1
cupertino_icons: ^1.0.3
shared_preferences: ^2.0.6
http: ^0.13.3
mobx: ^2.0.1
flutter_mobx: ^2.0.0
provider: ^5.0.0
validators: ^3.0.0
dio: ^4.0.0
another_flushbar: ^1.10.23
material_dialog: ^1.0.0-nullsafety.1
intl: any
xxtea: ^2.1.0
sembast: ^3.1.0+2
path_provider: ^2.0.2
get_it: ^7.1.3
google_fonts: ^2.3.2
dev_dependencies:
flutter_test:
sdk: flutter
flutter_launcher_icons: ^0.12.0
mobx_codegen: ^2.1.1
build_runner: ^2.3.3
analyzer: ^5.10.0
flutter_icons:
image_path: "assets/icons/ic_launcher.png"
android: true
ios: true
flutter:
uses-material-design: true
assets:
- assets/images/
- assets/icons/
- assets/lang/
fonts:
- family: ProductSans
fonts:- asset: assets/fonts/Product-Sans-Regular.ttf
- asset: assets/fonts/Product-Sans-Italic.ttf
style: italic - asset: assets/fonts/Product-Sans-Bold.ttf
weight: 700
hope this solves your problem @zubairehman kindly update your pubspec.yml
Thanks @tusharuit25
implemented your suggestions into the code, changing to the next pubspec.yml worked for me:
name: boilerplate
description: A flutter boilerplate project created using MobX and Provider.
# The following defines the version and build number for your application.
# A version number is three numbers separated by dots, like 1.2.43
# followed by an optional build number separated by a +.
# Both the version and the builder number may be overridden in flutter
# build by specifying --build-name and --build-number, respectively.
# Read more about versioning at semver.org.
version: 1.0.0+1
environment:
sdk: ">=2.15.0 <3.7.7"
dependencies:
flutter:
sdk: flutter
flutter_localizations:
sdk: flutter
flutter_cupertino_localizations: ^1.0.1
# The following adds the Cupertino Icons font to your application.
# Use with the CupertinoIcons class for iOS style icons.
cupertino_icons: ^1.0.3
# The following adds the shared pref as a dependency in your application
shared_preferences: ^2.0.6
# A composable, Future-based library for making HTTP requests.
http: ^0.13.3
# Flogs, a powerful logging framework
# f_logs: ^1.2.2
# MobX is a library for reactively managing the state of your applications. Use the power of
# observables, actions, and reactions to supercharge your Dart and Flutter apps.
mobx: ^2.0.1
flutter_mobx: ^2.0.0
# An helper to easily exposes a value using InheritedWidget without having to write one.
provider: ^5.0.0
# String validation and sanitization for Dart. Dart 2-compatible version of validator
validators: ^3.0.0
# A powerful Http client for Dart
dio: ^4.0.0
# A flexible widget for user notification. Customize your text, button, duration, animations
# and much more. For Android devs, it is made to replace Snackbars and Toasts.
another_flushbar: ^1.10.23
# Material Dialog
material_dialog: ^1.0.0-nullsafety.1
# This package provides internationalization and localization facilities, including message
# translation, plurals and genders, date/number formatting and parsing, and bidirectional text.
intl: ^0.17.0
# XXTEA is a fast and secure encryption algorithm. This is a XXTEA library for Dart.
xxtea: ^2.1.0
# An helper to easily exposes a value using InheritedWidget without having to write one.
sembast: ^3.1.0+2
path_provider: ^2.0.2
# for dependency injection
get_it: ^7.1.3
google_fonts: ^2.3.2
dev_dependencies:
flutter_test:
sdk: flutter
# The following adds the launcher icon support to your application.
# run below mentioned commands to generate launcher icons
# flutter packages get
# flutter packages pub run flutter_launcher_icons:main
flutter_launcher_icons: ^0.12.0
mobx_codegen: ^2.1.1
build_runner: ^2.3.3
analyzer: ^5.10.0
flutter_icons:
image_path: "assets/icons/ic_launcher.png"
android: true
ios: true
# For information on the generic Dart art of this file, see the
# following page: https://www.dartlang.org/tools/pub/pubspec
# The following section is specific to Flutter.
flutter:
# The following line ensures that the Material Icons font is
# included with your application, so that you can use the icons in
# the material Icons class.
uses-material-design: true
# To add assets to your application, add an assets section, like this:
assets:
- assets/images/
- assets/icons/
- assets/lang/
# An image asset can refer to one or more resolution-specific "variants", see
# https://flutter.io/assets-and-images/#resolution-aware.
# For details regarding adding assets from package dependencies, see
# https://flutter.io/assets-and-images/#from-packages
# To add custom fonts to your application, add a fonts section here,
# in this "flutter" section. Each entry in this list should have a
# "family" key with the font family name, and a "fonts" key with a
# list giving the asset and other descriptors for the font. For
# example:
fonts:
- family: ProductSans
fonts:
- asset: assets/fonts/Product-Sans-Regular.ttf
- asset: assets/fonts/Product-Sans-Italic.ttf
style: italic
- asset: assets/fonts/Product-Sans-Bold.ttf
weight: 700
# For details regarding fonts from package dependencies,
# see https://flutter.io/custom-fonts/#from-packages