5

I tried to use compass from an Angular application written in TypeScript (not Javascript), but when I write the next line:

// general.scss
@import 'compass/css3';

I get the following error:

@import 'compass/css3';
^
      File to import not found or unreadable: compass/css3.

How could I install compass?

Cequiel
  • 3,505
  • 6
  • 27
  • 44

3 Answers3

8

Try importing it with this ~ as in (if you've installed compass-mixins),

@import '~compass-mixins/lib/compass/css3';
amal
  • 3,140
  • 1
  • 13
  • 20
6

Thanks good I found the solution. Simply install compass-mixins:

$ npm install compass-mixins

And then read it from the node_modules folder:

@import '../../../node_modules/compass-mixins/lib/compass';

It's a bit cumbersome, but it works.

update: Do not use the previous import. Use the following syntax, as described in https://stackoverflow.com/a/47932124/1704895

@import '~compass-mixins/lib/compass/css3';
Cequiel
  • 3,505
  • 6
  • 27
  • 44
-1

Indeed below one worked for me.

@import '//classpath:compass/css3';