内部错误:无效UTF-8 - Sass &饮而尽

Internal Error: Invalid UTF-8 - Sass & Gulp

本文关键字:Sass 错误 无效 UTF-8 内部      更新时间:2023-09-26

尝试在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

注:类似问题:错误&;Invalid utf -8&;当用@import编译sass时这是通过从路径中删除特殊字符来修复的,但是我所有的文件夹都是英文的,并且一直都是。

您可以尝试将文件转换为ASCII,看看是否?,这些是非UTF-8字符:

cat your-file.css | iconv -f utf-8 -t ascii//TRANSLIT > ascii.css