我正试着用沙司和咕噜。我在路上安装了红宝石,沙司和咕哝声。
版本是,
节点: 0.10.20 国家预防机制: 1.3.11 咕噜-cli: 0.1.13 咕噜声: 0.4.5 sass: 3.4.4
我的包裹是,
"private": true,
"devDependencies": {
"express": "4.x",
"grunt": "~0.4.1",
"grunt-contrib-sass": "~0.3.0",
"grunt-contrib-watch": "~0.4.4"
}我的抱怨文件是,
module.exports = function(grunt) {
grunt.initConfig({
pkg: grunt.file.readJSON('package.json'),
sass: {
dist: {
files: {
'style/style.css' : 'sass/home.scss'
}
}
},
watch: {
css: {
files: '**/*.scss',
tasks: ['sass']
}
}
});
grunt.loadNpmTasks('grunt-contrib-sass');
grunt.loadNpmTasks('grunt-contrib-watch');
grunt.registerTask('default',['watch']);
}现在,如果我尝试“咕噜”命令,我将得到以下错误。有什么帮助吗?
run:“咕噜”或“咕噜”或“咕噜”,
错误:
Running "sass:dist" (sass) task
Error: Error generating source map: couldn't determine public URL for the source
stylesheet.
No filename is available so there's nothing for the source map to link
to.
on line of standard input
Use --trace for backtrace.
Warning: Error: Error generating source map: couldn't determine public URL for t
he source stylesheet.
No filename is available so there's nothing for the source map to link
to.
on line of standard input
Use --trace for backtrace. Use --force to continue.
Aborted due to warnings.知道吗?
发布于 2014-10-22 06:40:38
看来你没有安装指南针。您可以运行gem install compass。在您最初的示例中,您将您的grunt文件设置为使用指南针,这将使您能够访问指南针、混合器和功能。
您的代码现在看起来很好,应该可以工作,但似乎找不到您的文件。当我在电脑旁边的时候,我也会这样做的。
同时,您可以在sass任务上尝试sourcemap: none选项。
更新:
对我来说很好。您能不能运行tree -I node_modules并发布输出(除非您认为有任何敏感信息),只为了再次检查文件是否在正确的位置?
我希望它看起来像这样
.
├── Gruntfile.js
├── package.json
├── sass
│ └── style.scss
└── style
├── style.css
└── style.css.map第二次更新:您的软件包似乎比我的新设置中的要老得多。要么从头开始,要么执行以下操作:
安装npm-检查更新
npm install npm-check-updates 然后运行以下命令
npm-check-updates会告诉你哪些包过时了npm-check-updates -u将更新package.json中的那些包npm update更新所有过时的软件包。发布于 2015-03-31 06:37:24
更新节点模块帮助..。
npm -检查更新将告诉您哪些包是过时的npm-检查更新-u将更新那些包在您的package.json npm更新,以更新您的所有过时的包。
https://stackoverflow.com/questions/26501454
复制相似问题