TypeError: The "original" argument must be of type Function - SASS

269 views Asked by At

I'm trying to use the dart-sass module to compile some SCSS in my React project with Typescript. I installed the module, imported it, and got the error in the title. What could it be? Some type of imports I tried:

import { renderSync } from 'sass';
import sass from 'sass';
const sass = require('sass');

Everything throws the following error:

TypeError: The "original" argument must be of type Function - SASS

1

There are 1 answers

3
Salah ED On

Try to follow these steps i think it will fix your problem :

Add node-sass to your project

$ npm i node-sass --save-dev

Include node-sass in your Gruntfile

const sass = require('node-sass');

In your sass options, change the following line

from

implementation: 'sass-dist'

to

implementation: sass