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?
Try importing it with this ~
as in (if you've installed compass-mixins),
@import '~compass-mixins/lib/compass/css3';
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';
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With