Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Why do I get '2 arguments required, but only 1 was passed.' when trying to compile my Sass template?

I get the below error while building my project

SassError: 2 arguments required, but only 1 was passed.
    width: rem(300);
           ^^^^^^^^

Below is my package.json

{
  "name": "test",
  "version": "3.0.0",
  "private": true,
  "scripts": {
   
  },
  "devDependencies": {
    "mini-css-extract-plugin": "^2.4.2",
    "node-sass": "^6.0.1",
    "postcss": "^8.3.9",
    "postcss-loader": "^6.2.0",
    "postcss-preset-env": "^6.7.0",
    "sass": "^1.3",
    "sass-loader": "^12.1.0"
  },
  "dependencies": {
    "grunt-sass": "^3.1.0"
  }

}

What is the issue?

like image 516
user8184933 Avatar asked Oct 21 '25 12:10

user8184933


1 Answers

Ran into the same problem today, I had "sass": "^1.26.5" in my package.json.

sass got updated yesterday to 1.65.1, your build should work with 1.64.2 https://www.npmjs.com/package/sass/v/1.65.1?activeTab=versions I got that problem due to another dependency I have no control over, so changing sass version was the only option for now. But if you used rem() in your own code, go for Ali Klein's answer.

like image 80
Irina Vatamanu Avatar answered Oct 24 '25 02:10

Irina Vatamanu



Donate For Us

If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!