Coder Social home page Coder Social logo

Version 7.1.8 Post-Install Issue about rfs HOT 10 CLOSED

twbs avatar twbs commented on May 8, 2024
Version 7.1.8 Post-Install Issue

from rfs.

Comments (10)

themounthead avatar themounthead commented on May 8, 2024 1

@MartijnCuppens , this appears to be a problem with my webpack configuration and not RFS. Thanks for introducing the warning, it definitely helped me trace the source.

I'll try to resolve it from here.

from rfs.

MartijnCuppens avatar MartijnCuppens commented on May 8, 2024

Hi @themounthead,

Do you override the unit() function somewhere in your setup?

from rfs.

themounthead avatar themounthead commented on May 8, 2024

Thanks for your response.

I've left the RFS defaults as is, haven't done any overrides or variable changes. Oddly the same setup works fine with v7.1.4.

Is there any new configuration or preset needed ? Thanks.

from rfs.

MartijnCuppens avatar MartijnCuppens commented on May 8, 2024

There is no different configuration needed to upgrade from 7.1.4 to 7.1.8. Can you test the versions between 7.1.4 and 7.1.8 so we can detect where it went wrong?

from rfs.

MartijnCuppens avatar MartijnCuppens commented on May 8, 2024

@themounthead, could it be you 're including the mixin twice? I encountered the same error today when I did this.

from rfs.

themounthead avatar themounthead commented on May 8, 2024

@MartijnCuppens , that's a good point. I double-checked my setup and I've imported rfs only once with @import '~rfs/scss/_rfs';

I also deleted my node_modules/ and re-installed the app setup. With v7.1.8, I get the same error. But when I explicitly install v7.1.4, its working as expected.

I'll have to create a skeleton Angular App and try to trace the problem. The only other Sass mixin I'm using in addition to this is include-media; not sure if that's creating some kind of interference.

from rfs.

MartijnCuppens avatar MartijnCuppens commented on May 8, 2024

Can you try v7.1.9 and let me know if everything is ok with that version?

from rfs.

themounthead avatar themounthead commented on May 8, 2024

@MartijnCuppens , I tried out the new version and as you mentioned I see a Warning stating that the 'RFS is included more than once'. This kind of puts me in a fix.

I've organized my App into components with each component having its own .scss properties. At the global level, I've defined a variables file where I've specified all Sass variables and imported RFS here.

If I move the RFS import at the Application root, I get an error no mixin named rfs which implies that the mixin is needed at every @include.

Am I missing something, please advise.

from rfs.

MartijnCuppens avatar MartijnCuppens commented on May 8, 2024

@themounthead,
That's a safety I build into v7.1.9. One way or another you 're importing RFS twice which you shouldn't be doing.

You should be able to see where you included the mixin the second time, something like this:

WARNING: Watch out, RFS is included more than once!
         on line 209 of ../../../scss/_rfs.scss
         from line 2 of src/main.scss

If that looks ok to you, it's probably the first import which is causing the issue. Worst case you can add a @warn to node_modules/rfs/scss/rfs.scss folder so you can trace where your first import happens.

from rfs.

themounthead avatar themounthead commented on May 8, 2024

@MartijnCuppens , please bear with me a bit longer. I'm kind of going in circles here.

I've been able to import other mixins like _typi, _include-media globally without any error/warning.

My doubt is when I import RFS once (at the root scope), I get an error no mixin named rfs from every module component that uses the @include rfs mixin.
This error led me to include it within my .scss variables file. But on doing that, I end up with a long stream of warnings that I shouldn't include it more than once (which I agree is not a good practice).

Does this mean I have to define the RFS variables in only one file and refer them in other .scss component files.

Thanks

from rfs.

Related Issues (20)

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.