gpt4 book ai didi

sass - Compass 和 Susy 需要不同版本的 Sass

转载 作者:行者123 更新时间:2023-12-04 23:01:31 25 4
gpt4 key购买 nike

我在我的网站上工作,我想使用 Susy 和 Compass。我也在使用 Grunt。当我运行 grunt 任务时,出现此错误:

Denniss-MacBook-Pro:portfolio dennis$ grunt --trace
Running "compass:dev" (compass) task
Gem::LoadError on line ["1990"] of /System/Library/Frameworks/Ruby.framework/Versions/2.0/usr/lib/ruby/2.0.0/rubygems/specification.rb: Unable to activate susy-2.1.1, because sass-3.2.17 conflicts with sass (~> 3.3.0)
Run with --trace to see the full backtrace
Warning: ↑ Use --force to continue.

Aborted due to warnings.

这是我的 Grunt 文件:
module.exports = function(grunt) {
grunt.initConfig({
pkg: grunt.file.readJSON('package.json'),

watch: {
options: {
livereload: true
},
css: {
files: ['_sass/*.{scss,sass}'],
tasks: ['compass:dev']
},
js: {
files: ['js/*.js'],
tasks: ['uglify']
}
},

compass: {
options: {
require: 'susy'
},
dev: {
options: {
sassDir: ['_sass'],
cssDir: ['css'],
environment: 'development',
}
},

production: {
options: {
sassDir: ['_sass'],
cssDir: ['css'],
outputStyle: 'compressed',
environment: 'production',
}
}
},

uglify: {
all: {
files: {
'js/main.min.js': [
'js/libs/*.js',
'js/src/*.js'
]
}
}
},

connect: {
port: 8000
}
});

grunt.loadNpmTasks('grunt-contrib-compass');
grunt.loadNpmTasks('grunt-contrib-watch');
grunt.loadNpmTasks('grunt-contrib-uglify');
grunt.loadNpmTasks('grunt-contrib-connect');

grunt.registerTask('default', ['compass:dev', 'uglify','connect', 'watch']);
grunt.registerTask('production', ['compass:production', 'uglify']);
}

我只是不知道该怎么办,提前致谢!

最佳答案

它们不兼容的依赖关系存在问题:
susy 2.0.0 依赖于 sass ~> 3.3.0
指南针 0.12.3 取决于 sass = 3.2.14

您可以通过以下方式列出所有 gem :

gem list

尝试这样做:
gem install compass --pre

这应该有效。

关于sass - Compass 和 Susy 需要不同版本的 Sass,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/22555984/

25 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com