gruntjs / grunt-contrib-sass

Compile Sass to CSS.
http://gruntjs.com/
MIT License
848 stars 141 forks source link

cant import relative file path #208

Closed jsgv closed 5 years ago

jsgv commented 9 years ago

I am unable to import a file a level from the current directory. grunt-contrib-sass v 0.9.2 sass v 3.4.14

assets/src/sass/commons.scss
folder/
    Gruntfile.js
    |-assets
        |-src
            |-sass
                |-styles.scss

styles.scss

@import '../assets/src/sass/common';

Error

Error: File to import not found or unreadable: ../assets/src/sass/common.
        on line 1 of assets/src/sass/power-of-clarity-program.scss

1: @import '../assets/src/sass/common';

It was working about a week ago. Not sure what has changed now. Did not update sass nor grunt-contrib-sass.

eSvetlova commented 6 years ago

Looks like the correct import path for your directories structure is @import '../../../../assets/src/sass/common';

4 levels up.