Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

"Original" argument must be of type Function. Received type undefined #288

Closed
jasonsturges opened this issue Jul 6, 2018 · 3 comments
Closed

Comments

@jasonsturges
Copy link

jasonsturges commented Jul 6, 2018

In upgrading a project from v2.1.0 to v3.0.1, I'm now receiving an error:

Fatal error: The "original" argument must be of type Function. Received type undefined

Not sure what this is referencing; however, is new after the upgrade.

SASS portion of Gruntfile.js:

sass: {
    dist: {
        options: {
            implementation: 'sass-dist',
            outputStyle: 'compact',
            sourceComments: false,
            sourceMap: true
        },
        files: {
            'css/example.css': 'sass/example.scss',
        }
    }
}
@Suriv
Copy link

Suriv commented Jul 9, 2018

Look at the grungfile of the project, this is the key.

https://github.com/sindresorhus/grunt-sass/blob/master/gruntfile.js

The new version needs Node 8 or higher

@tobsn-me
Copy link

I ran into this error, too. To fix this, follow these steps:

  1. Add node-sass to your project

    $ npm i node-sass --save-dev
  2. Include node-sass in your Gruntfile

    const sass = require('node-sass');
  3. In your sass options, change the following line

    from

    implementation: 'sass-dist'

    to

    implementation: sass

@JonMcL
Copy link

JonMcL commented Feb 24, 2020

If anyone ends up here and can't figure it out, this might help ---

I accidentally (stupidly?) had the 'implementation' argument as a string, so change

implementation: 'sass'

to

implemenation: sass

This of course depends on the

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

line to populate the sass object.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

5 participants