Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

STSS not working on node 0.12.0 #24

Closed
theerapat-y opened this issue Feb 26, 2015 · 3 comments
Closed

STSS not working on node 0.12.0 #24

theerapat-y opened this issue Feb 26, 2015 · 3 comments
Assignees
Milestone

Comments

@theerapat-y
Copy link

Converting stss to tss always throws this error

/usr/local/lib/node_modules/stss/node_modules/css-parse/index.js:119
    css = css.slice(str.length);
              ^
TypeError: undefined is not a function
    at match (/usr/local/lib/node_modules/stss/node_modules/css-parse/index.js:119:15)
    at whitespace (/usr/local/lib/node_modules/stss/node_modules/css-parse/index.js:128:5)
    at rules (/usr/local/lib/node_modules/stss/node_modules/css-parse/index.js:101:5)
    at stylesheet (/usr/local/lib/node_modules/stss/node_modules/css-parse/index.js:73:16)
    at module.exports (/usr/local/lib/node_modules/stss/node_modules/css-parse/index.js:485:10)
    at module.exports (/usr/local/lib/node_modules/stss/lib/renderer/css2json.js:438:12)
    at /usr/local/lib/node_modules/stss/stss.js:61:15
    at fn (/usr/local/lib/node_modules/stss/node_modules/async/lib/async.js:641:34)
    at Immediate._onImmediate (/usr/local/lib/node_modules/stss/node_modules/async/lib/async.js:557:34)
    at processImmediate [as _immediateCallback] (timers.js:358:17)

note: I installed stss as global and I have updated some deps to newer versions

dependencies
node 0.12.0
node-sass 2.0.1
css-parse 2.0.0
yargs 3.3.1
chalk 1.0.0

STSS file sample

.addFavWrapper {
    top: 20;
    z-index: 9999;
    height: fill;
    background-color: #f4ead5;
}
#addFavHeader {
    background-color: #fff;
    width: 100%;
    height: 45;
    top: 0;
}
#addFavBody {
    top: 46;
}
#addFavHeaderTitle {
    color: #000;
    @media android {
        font: {
            size: 18;
            family: Alloy.Globals.textLight;
        }
    }
    @media ios {
        font: {
            size: 16;
            family: Alloy.Globals.textLight;
        }
    }
}
#borderBottom {
    width: 100%;
    height: 1;
    bottom: 0;
    background-color: #dbd2bd;
}

#addFavCloseBtn {
    left: 2.5;
    top: 0.5;
    color: #f60a29;
    width: 30;
    height: fill;
    background-color: #fff;
    font: {
        family: flaticon;
        size: 26;
    }
}

#addFavTitle {
    color: #000;
    left: 10;
    top: 10;
    font: {
        family: Alloy.Globals.textLight;
        size: 16;
    }
}

.headerBottomLine {
    height: 2;
    width: fill;
    background-color: #f60a29;
    bottom: 0;
}
#searchField {
    top: 35;
    left: 10;
    right: 10;
    bottom: 10;
    color: #000;
    width: fill;
    height: 40;
    z-index: 20;
    padding-left: 10;
    background-color: #fff;
    border-radius: 4;
    border-width: 1;
    border-color: #f60a29;
    font: {
        family: Alloy.Globals.textLight;
        size: 16;
    }
}

.loadingIndicator {
    height: size;
    width: size;
    z-index: 100;
    top: 93;
    right: 40;
    color: #5e5e5e;
    font: {
        size: 14;
    }
}

#suggestList {
    height: size;
    left: 0;
    right: 0;
    width: fill;
    top: 90;
    border-color: #f4ead5;
    border-radius: 1;
    z-index: 10;
}
#searchItemWrapper {
    height: 44;
    background-color: #fff;
}
#linksTitle {
    color: #000;
    height: 20;
    top: 5;
    left: 10;
    right: 25;
    width: fill;
    word-wrap: true;
    ellipsize: true;
    vertical-align: Ti.UI.TEXT_VERTICAL_ALIGNMENT_TOP;
    text-align: left;
    font: {
        size: 14;
        family: Alloy.Globals.textNormal;
    }
}

#linksURL {
    color: gray;
    height: size;
    top: 24;
    left: 10;
    font: {
        size: 11;
        family: Alloy.Globals.textNormal;
    }
}

#addNewBtn {
    top: 85;
    right: 10;
    height: 35;
    width: 80;
    border-radius: 4;
    color: #fff;
    background-color: #f60a29;
    z-index: 9;
    font: {
        family: Alloy.Globals.textBold;
        size: 16;
    }
}

#clearTextBtn {
    visible: false;
    top: 33;
    z-index: 999;
    width: 45;
    height: 45;
    right: 10;
}
#clearTextBg {
    background-color: #fff;
    width: 18;
    height: 18;
    border-radius: 9;
}
#clearTextIcon {
    color: #9b9b9b;
    height: fill;
    text-align: center;
    width: fill;
    left: 0;
    top: 0;
    font: {
        family: flaticon;
        size: 18;
    }
}

#showUrl {
    top: 90;
    opacity: 0;
    left: 20;
    width: 260;
    color: #717171;
    font: {
        family: Alloy.Globals.textLight;
        size: 12;
    }
}
@theerapat-y
Copy link
Author

It turned out that node 0.12.0 causes all the problem.

@theerapat-y theerapat-y changed the title Could not parse from css to json STSS not working on node 0.12.0 Feb 26, 2015
@whosdustin
Copy link

Will STSS be updated to work with node 0.12.0? I am running node 0.10.13 and am running into the same error. What version of node does it work with?

@RonaldTreur
Copy link
Owner

Absolutely! Apologies for the silence, I'll get to work asap!
Currently only Node.js v10 is supported. Support for 0.12 (and node-sass 3.0) is underway!

@RonaldTreur RonaldTreur self-assigned this May 1, 2015
@RonaldTreur RonaldTreur added this to the 0.4 milestone May 1, 2015
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants