qodesmith / datepicker

Get a date with JavaScript! A datepicker with no dependencies.
344 stars 101 forks source link

SassError: Invalid CSS... build failing because of error in dependency #135

Open tommy3wood opened 1 year ago

tommy3wood commented 1 year ago

No sure if this is a known issue or if it's just come up and I'm the first one to report it. My research on the error had me trying some seemingly disconnected strategies for resolving the issue and none of them worked.

This package has never had an issue in the year I've been working in this repo but this week the build failed and I can't seem to figure out a fix. Anybody else seeing this issue? If it's a one-off thing I might just call it an L and use a different library 🤷

Screen Shot 2022-12-02 at 9 40 31 AM
qodesmith commented 1 year ago

What version are you using?

Skaant commented 1 year ago

I'm seeing this issue since my last build. I'm using Node 14 and js-datepicker 5.18.0 for concerned project. Strange it stopped working while no update has been made (running from a container on Github Actions).

My current option is that node-sass has been updated and now reject given syntax. Curious about resolution of this bug, while I'm trying things on my side.

I'm still considering replacing SCSS dependency with built CSS import, but seems less "engineered".

Steffen8608 commented 1 year ago

@Skaantc / @tommy3wood I would assume this is a result of https://github.com/qodesmith/datepicker/pull/122. If you are using the deprecated node sass i think it is possible that it doesn't support Math.div(). Node sass receives only maintenance updates no more features. You can try to switch from node-sass to dart sass -> https://sass-lang.com/dart-sass if thats no option you could pin the version of the plugin for now to 5.18.0, the PR was part of 5.18.1.

https://sass-lang.com/blog/libsass-is-deprecated

It says it should be a quite easy migration: "If you’re a user of Node Sass, migrating to Dart Sass is straightforward: just replace node-sass in your package.json file with sass. Both packages expose the same JavaScript API."