markteekman / accessible-astro-components

A set of Accessible, easy to use, Front-end UI Components for Astro.

Home Page:https://accessible-astro.netlify.app/accessible-components/

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

`Preprocessor dependency "sass" not found. Did you install it?` error

tinymachine opened this issue ยท comments

Some components rely on sass (e.g. Modal.astro uses the lang="scss" attribute on the <style> tag), but sass isn't included in the package.json. Probably should be added as a dev dependency?

Good one @tinymachine, that should indeed be added as a dev dependency! Thanks again for going through these components so thoroughly, it really helps improve the quality of the project ๐Ÿ™‚ I'll add it in the next update!

My pleasure, @markteekman -- thank you for sharing these components with the world!

@markteekman I am not sure if I am missing something, but following the install steps and adding a pagination component, I still see this error. Is there a docs step missing?

Hey @ChrisChinchilla, hmm, that's weird. Does this also happen with the other components or only with the pagination?

@markteekman Not needed any of the others, but tried skip links quickly, same error

@ChrisChinchilla just tested this with a fresh Astro install and can indeed confirm the issue. It seems Sass is needed inside the project as wel (having it as a dependency inside the components package isn't enough), so doing a npm install sass in your project solves it.

However, I do find this to be an unnecessary extra step for those who won't be using Sass in their project ๐Ÿค” So what I think I'll do is just write the components in CSS, seeing as I'm only using Sass's nesting feature and nothing more. I'll work on it when I have some time! Thanks for noticing ๐Ÿ™‚

@ChrisChinchilla this issue should now be resolved in the latest release ๐Ÿ™‚