尝试在Linux Ubuntu中运行gulp sass
时出现以下错误
hutber@hutber-ubuntu:/var/www/beta.norsemanfc.co.uk$ gulp sass
[14:43:26] Using gulpfile /var/www/beta.norsemanfc.co.uk/gulpfile.js
[14:43:26] Starting 'sass'...
[14:43:27] gulp-notify: [Compile Error] frontend/sass/style.scss
Internal Error: Invalid UTF-8
[14:43:27] Finished 'sass' after 547 ms
在所有文件/文件夹中搜索任何特殊字符都不会返回任何内容。
hutber@hutber-ubuntu:/var/www/beta.norsemanfc.co.uk$ find ./* -iregex '.*/.*[èö].*' -print
否则,如果我在文件的开头删除@import,它将在@include border-box-sizing上失败;因为这是susy
当然,我怎样才能让sass在本地运行?
更新
hutber@hutber-ubuntu:/var/www/beta.norsemanfc.co.uk/frontend/sass$ find ./* | xargs grep -i '.*/.*[èö].*'
grep: ./fonts: Is a directory
grep: ./fonts/helvetica-neue: Is a directory
grep: ./modules: Is a directory
grep: ./modules/form: Is a directory
grep: ./pages: Is a directory
grep: ./plugins: Is a directory
grep: ./susy: Is a directory
grep: ./susy/susy: Is a directory
grep: ./susy/susy/language: Is a directory
grep: ./susy/susy/language/susy: Is a directory
grep: ./susy/susy/language/susyone: Is a directory
grep: ./susy/susy/su: Is a directory
grep: ./susy/susy/output: Is a directory
grep: ./susy/susy/output/support: Is a directory
grep: ./susy/susy/output/float: Is a directory
grep: ./susy/susy/output/shared: Is a directory
NB:类似问题:Error "Invalid UTF-8" when compiling sass with @import 这是通过从路径中删除特殊字符来解决的,但是我的所有文件夹都是英文的,并且一直都是。
答案 0 :(得分:0)
您可以尝试将文件转换为ASCII并查看是否?出现标记,那些是非UTF-8标记:
cat your-file.css | iconv -f utf-8 -t ascii//TRANSLIT > ascii.css