i was trying to compile css to scss and i am getting this error

Viewed 74
{
  "status": 1,
  "file": "E:/Natours/sass/main.scss",
  "line": 31,
  "column": 5,
  "message": "argument `$alpha` of `rgba($color, $alpha)` must be a number",
  "formatted": "Error: argument `$alpha` of `rgba($color, $alpha)` must be a number\n        on line 31 of sass/main.scss, in function `rgba`\n        from line 31 of sass/main.scss\n>>     rgba($color-primary-light, o.8),\r\n   ----^\n"
}

This is errors from console:

npm ERR! code ELIFECYCLE
npm ERR! errno 1
npm ERR! natours@1.0.0 compile:sass: `node-sass sass/main.scss css/style.css`
npm ERR! Exit status 1
npm ERR!
npm ERR! Failed at the natours@1.0.0 compile:sass script.
npm ERR! This is probably not a problem with npm. There is likely additional logging output above.

npm ERR! A complete log of this run can be found in:
npm ERR!     C:\Users\SAHIL\AppData\Roaming\npm-cache\_logs\2021-09-02T01_47_56_926Z-debug.log
1 Answers

Looks like the opacity could not be send as an variable, try to send an appropriate number instead:

rgba($color, 0.88);
Related