Dart SassBuilder cannot find Logger


I am trying to run an angular web app. I have cloned confirmed working project, but when I run pub get I get following error:

/usr/lib/dart/bin/pub get
Resolving dependencies...
Got dependencies!
Precompiling dependencies...
Loading source assets...
Loading angular, sass_builder and dart_to_js_script_rewriter transformers...
Error on line 26, column 5 of ../../.pub-cache/hosted/pub.dartlang.org/angular_components-0.8.0/pubspec.yaml: Error loading transformer: 'package:sass_builder/sass_builder.dart': malformed type: line 34 pos 20: cannot resolve class 'Logger' from 'SassBuilder'
  final _log = new Logger('sass_builder');

    outputExtension: .scss.css
Process finished with exit code 0

My pub.yaml:

name: ZwinnexD
description: A web app that is a web app
version: 0.21.37
#homepage: https://www.example.com
#author: Kod Schrödingera <email@example.com>

  sdk: '>=1.24.0 <2.0.0'

  angular: ^4.0.0
  angular_components: ^0.8.0
  firebase: ^4.0.0

  angular_test: ^1.0.0
  browser: ^0.10.0
  dart_to_js_script_rewriter: ^1.0.1
  test: ^0.12.0

- angular:
      - web/main.dart
      - test/**_test.dart
- test/pub_serve:
    $include: test/**_test.dart
- dart_to_js_script_rewriter

# Uncomment the following in sdk 1.24+ to make pub serve
# use dartdevc (webdev.dartlang.org/tools/dartdevc).
#  compiler:
#    debug: dartdevc

I am using dart 1.24.3.
I have tried removing pub-cache, doing cache repair, even reinstalling Dart. Nothing helps. I work on Ubuntu 16.04. Please help.

I can also confirm that basic projects from WebStorm don’t work either. I am not sure what can I do beside uninstalling and installing dart…


It was issue in sass-builder. To fix it, use sass_builder: ^1.1.5 or above in pubspec.yaml. Here is pull request with fix.

Answered By – Zufar Muhamadeev

Answer Checked By – Katrina (FlutterFixes Volunteer)

Leave a Reply

Your email address will not be published. Required fields are marked *