这是我在 gruntfile 中的 sass 声明。
sass: {
dist: {
options: {
implementation: 'node-sass',
style: 'expanded',
noCache: true
},
files: {
'dist/css/jk.css' : 'src/styles/jk.scss'
}
}
},
这是运行 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
看来 sass 正在执行,并且正确发送我的文件路径,但由于某种原因返回未定义。
我可以通过命令行手动编译我的 sass 文件,没有任何问题。
这是我的 package.json 中的一些版本信息
"grunt": "^1.0.3"
"grunt-sass": "^3.0.1"
"node-sass": "^4.9.3"
你的 Node 版本是什么?
也看看这个
https://github.com/sindresorhus/grunt-sass/issues/288 https://github.com/sindresorhus/grunt-sass/issues/288
本文内容由网友自发贡献,版权归原作者所有,本站不承担相应法律责任。如您发现有涉嫌抄袭侵权的内容,请联系:hwhale#tublm.com(使用前将#替换为@)