Using grunt-sass to compile node-sass, I get the error “Fatal error: The ”original“ argument must be of type function.”

a 夏天 提交于 2019-12-11 17:01:03

问题


Here is my sass declaration in my gruntfile.

  sass: {
    dist: {
      options: {
        implementation: 'node-sass',
        style: 'expanded',
        noCache: true
        },
      files: {
        'dist/css/jk.css' : 'src/styles/jk.scss'
      }
    }
  },

Here is the output when running grunt -v.

  Running "sass:dist" (sass) task
  Verifying property sass.dist exists in config...OK
  Files: src/styles/jk.scss -> dist/css/jk.css
  Options: precision=10, implementation="node-sass", style="expanded", noCache

  undefined

  Fatal error: The "original" argument must be of type function

It appears that sass is getting executed, and is sending my file paths correctly, but for some reason returning undefined.

I am able to compile my sass files manually by command line without any issue.

Here's some version information from my package.json

"grunt": "^1.0.3"
"grunt-sass": "^3.0.1"
"node-sass": "^4.9.3"

回答1:


Whats your version of Node??

also look at this

https://github.com/sindresorhus/grunt-sass/issues/288



来源:https://stackoverflow.com/questions/52196332/using-grunt-sass-to-compile-node-sass-i-get-the-error-fatal-error-the-origin

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!