cmd.exe /D /C call C:/Ruby22-x64/bin/scss.bat --no-cache --update --sourcemap --watch current.scss:current.css
DEPRECATION WARNING: Passing --sourcemap without a value is deprecated.
Sourcemaps are now generated by default, so this flag has no effect.
Encoding::CompatibilityError: incompatible character encodings: GBK and UTF-8
Use --trace for backtrace.
进程已结束,退出代码1
好像是这两个原因中的一个,1,scss的配置写错了,scss和sass是两个配置文件。一个是语言的问题,编译utf-8的内容不能出现中文。
1,加一句编码,@charset "UTF-8"
2,Encoding::CompatibilityError: incompatible character encodings: GBK and UTF-8
3,打开--trace
4,出现如下提示信息:filesystem.rb 87行的index
5,找到文件lib\ruby\gems\2.3.0\gems\sass-3.4.22\lib\sass\importers\filesystem.rb的87行
6,测试:
7,结果:
8,如果scss文件中带中文会报错,解决方法如上图中第一行添加 @charset "UTF-8"