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

Weird error after updating to 3.x #402

Closed
stevenvachon opened this issue Jul 5, 2017 · 5 comments
Closed

Weird error after updating to 3.x #402

stevenvachon opened this issue Jul 5, 2017 · 5 comments

Comments

@stevenvachon
Copy link

stevenvachon commented Jul 5, 2017

Message:
    Parse error on line 1:
-(.8em)
-^
Expecting 'SUB', 'PREFIX', 'NUMBER', 'LENGTH', 'ANGLE', 'TIME', 'FREQ', 'RES', 'EMS', 'EXS', 'CHS', 'REMS', 'VHS', 'VWS', 'VMINS', 'VMAXS', 'PERCENTAGE', got 'LPAREN'
Details:
    domainEmitter: [object Object]
    domain: [object Object]
    domainThrown: false

Downgrading back to 2.11 fixes the issue.

@MoOx
Copy link
Owner

MoOx commented Jul 6, 2017

Maybe you can share the problematic piece of CSS? (and the stack trace?)

@MoOx
Copy link
Owner

MoOx commented Nov 2, 2017

Closed due to inactivity.

@MoOx MoOx closed this as completed Nov 2, 2017
@wadehammes
Copy link

wadehammes commented Nov 16, 2017

I just had this same issue, it didn't like this:

margin-left: calc(-(var(--maven-container-width) / 2) + -(var(--app-flyout-width) / 2));

Was working before updating to 3.0.x. So to test the waters, I added some :root variables for the divide-by-2 calculations and got this working, it isn't pretty (but builds):

margin-left: calc(calc(var(--maven-container-half) + var(--sidebar-half)) * -1);

Here is the full stack trace:

Message:
    Parse error on line 1:
-(20em / 2) + (19.687
-^
Expecting 'SUB', 'PREFIX', 'NUMBER', 'LENGTH', 'ANGLE', 'TIME', 'FREQ', 'RES', 'EMS', 'EXS', 'CHS', 'REMS', 'VHS', 'VWS', 'VMINS', 'VMAXS', 'PERCENTAGE', got 'LPAREN'
Details:
    hash: [object Object]
    fileName: /code/app/assets/css/trackmaven.css
Stack:
Error: Parse error on line 1:
-(20em / 2) + (19.687
-^
Expecting 'SUB', 'PREFIX', 'NUMBER', 'LENGTH', 'ANGLE', 'TIME', 'FREQ', 'RES', 'EMS', 'EXS', 'CHS', 'REMS', 'VHS', 'VWS', 'VMINS', 'VMAXS', 'PERCENTAGE', got 'LPAREN'
    at Object.parseError (/code/node_modules/postcss-cssnext/node_modules/reduce-css-calc/dist/parser.js:114:19)
    at Object.parse (/code/node_modules/postcss-cssnext/node_modules/reduce-css-calc/dist/parser.js:1:18)
    at /code/node_modules/postcss-cssnext/node_modules/reduce-css-calc/dist/index.js:24:29
    at walk (/code/node_modules/postcss-value-parser/lib/walk.js:10:17)
    at ValueParser.walk (/code/node_modules/postcss-value-parser/lib/index.js:18:5)
    at exports.default (/code/node_modules/postcss-cssnext/node_modules/reduce-css-calc/dist/index.js:19:54)
    at transformValue (/code/node_modules/postcss-cssnext/node_modules/postcss-calc/dist/lib/transform.js:16:31)
    at exports.default (/code/node_modules/postcss-cssnext/node_modules/postcss-calc/dist/lib/transform.js:38:13)
    at /code/node_modules/postcss-cssnext/node_modules/postcss-calc/dist/index.js:18:13
    at /code/node_modules/postcss/lib/container.js:101:31
    at Rule.each (/code/node_modules/postcss/lib/container.js:77:22)
    at Rule.walk (/code/node_modules/postcss/lib/container.js:101:38)
    at /code/node_modules/postcss/lib/container.js:102:18
    at Root.each (/code/node_modules/postcss/lib/container.js:77:22)
    at Root.walk (/code/node_modules/postcss/lib/container.js:101:38)
    at /code/node_modules/postcss-cssnext/node_modules/postcss-calc/dist/index.js:25:9
    at LazyResult.run (/code/node_modules/postcss/lib/lazy-result.js:1:18)
    at LazyResult.asyncTick (/code/node_modules/postcss/lib/lazy-result.js:138:22)
    at LazyResult.asyncTick (/code/node_modules/postcss/lib/lazy-result.js:146:13)
    at LazyResult.asyncTick (/code/node_modules/postcss/lib/lazy-result.js:146:13)
    at LazyResult.asyncTick (/code/node_modules/postcss/lib/lazy-result.js:146:13)
    at LazyResult.asyncTick (/code/node_modules/postcss/lib/lazy-result.js:146:13)
    at LazyResult.asyncTick (/code/node_modules/postcss/lib/lazy-result.js:146:13)
    at LazyResult.asyncTick (/code/node_modules/postcss/lib/lazy-result.js:146:13)
    at LazyResult.asyncTick (/code/node_modules/postcss/lib/lazy-result.js:146:13)
    at LazyResult.asyncTick (/code/node_modules/postcss/lib/lazy-result.js:146:13)
    at LazyResult.asyncTick (/code/node_modules/postcss/lib/lazy-result.js:146:13)
    at LazyResult.asyncTick (/code/node_modules/postcss/lib/lazy-result.js:146:13)
    at LazyResult.asyncTick (/code/node_modules/postcss/lib/lazy-result.js:146:13)
    at LazyResult.asyncTick (/code/node_modules/postcss/lib/lazy-result.js:146:13)
    at LazyResult.asyncTick (/code/node_modules/postcss/lib/lazy-result.js:146:13)
    at LazyResult.asyncTick (/code/node_modules/postcss/lib/lazy-result.js:146:13)
    at LazyResult.asyncTick (/code/node_modules/postcss/lib/lazy-result.js:146:13)
    at LazyResult.asyncTick (/code/node_modules/postcss/lib/lazy-result.js:146:13)
    at LazyResult.asyncTick (/code/node_modules/postcss/lib/lazy-result.js:146:13)
    at /code/node_modules/postcss/lib/lazy-result.js:138:13

@MoOx
Copy link
Owner

MoOx commented Nov 17, 2017

Could you report this to https://github.com/postcss/postcss-calc? Maybe related to postcss/postcss-calc#42

@Semigradsky
Copy link
Collaborator

-(var(--maven-container-width) / 2)

@wadehammes It looks like incorrect syntax. Should be like

-1*(var(--maven-container-width) / 2)

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

4 participants