Coder Social home page Coder Social logo

Comments (3)

travco avatar travco commented on September 13, 2024

Hey @LouisaNikita, is there any chance you can post the load order of your postcss plugins?

That might help identify the issue, as you (should) be able to do this.

from postcss-for.

drewbaker avatar drewbaker commented on September 13, 2024

I ran into this error today with a Nuxt site. Works locally, but on Netlifty it errors out at build:

3:09:39 PM: ERR! JisonLexerError: Lexical error on line 1: Unrecognized text.
3:09:39 PM: ERR!
3:09:39 PM: ERR!   Erroneous area:
3:09:39 PM: ERR! 1: $(i) * 40ms
3:09:39 PM: ERR! ^..^
3:09:39 PM: ERR!     at /opt/build/repo/components/PanelMenu.vue:99:21
3:09:39 PM: ERR!     at Object.parseError (/opt/build/repo/node_modules/postcss-calc/dist/parser.js:1200:15)
3:09:39 PM: ERR!     at Object.lexer_parseError [as parseError] (/opt/build/repo/node_modules/postcss-calc/dist/parser.js:2333:44)

Because of this code:

            /* Stagger animate menu items */
            @for $i from 1 to 50 {
                .menu-item:nth-child($(i)) {
                    transition-delay: calc($(i) * 40ms);
                }
            }

Using @nuxt/postcss8, and my plugin order is:

        postcss: {
            plugins: {
                "postcss-for": {},
                "postcss-nested": {},
                "postcss-custom-media": {},
                "postcss-hexrgba": {},
            },
        },

from postcss-for.

drewbaker avatar drewbaker commented on September 13, 2024

I managed to get a successful deploy by just changing the syntax to this:

            @for $i from 1 to 50 {
                .menu-item:nth-child($(i)) {
                    --index: $(i);
                    transition-delay: calc(var(--index) * 40ms);
                }
            }

from postcss-for.

Related Issues (18)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.