Visual Studio Code - 代码提示使用 webpack alias 的模块
今天 gulp 一个项目编译 sass 时提示
Encoding::CompatibilityError: incompatible character encodings: GBK and UTF-8
Use --trace for backtrace.
解决步骤
一:gulp-ruby-sass 配置--trace定位错误
sass(source, [options])
在 options 里配置{trace: true}const gulp = require('gulp');
const sass = require('gulp-ruby-sass');gulp.task('sass', () =>
sass('source/file.scss', {trace: true})
.on('error', sass.logError)
.pipe(gulp.dest('result'))
);
找到错误信息
注意 sass 版本!!!
C:/Ruby24-x64/lib/ruby/gems/2.4.0/gems/sass-3.5.5/lib/sass/importers/filesystem.rb:87:in `index': incompatible character encodings: GBK and UTF-8 (Encoding::CompatibilityError)
from C:/Ruby24-x64/lib/ruby/gems/2.4.0/gems/sass-3.5.5/lib/sass/importers/filesystem.rb:87:in `remove_root'
排除错误(将 gbk 转为 utf-8 编码)
http://ruby-doc.org/core-2.5.1/String.html#method-i-encode
encode(dst_encoding, src_encoding [, options] )→ str
(目标编码,原编码,[选项])
87 行改为:if name.encode("utf-8", "gbk").index(@root + "/") == 0
Visual Studio Code - 代码提示使用 webpack alias 的模块的更多相关文章
- Visual Studio Code 智能提示文件
Visual Studio Code 开发前端和node智能提示 visual studio code 是一个很好的编辑器,可以用来编写前端代码和nodejs. 我很喜欢使用VSC,现在流行框架对VS ...
- 关闭visual studio code 智能提示功能
对于程序初学者来说,应该少用IDE的提示功能,因为这样有助于记住一些常用的函数等功能.这也是为什么戏称喜欢用notepad++(windows)或者vim编辑器(Linux)来开发代码是大神的原因,而 ...
- 在 Visual Studio Code 中使用 PoweShell - CodeShell
一直希望在 Visual Studio Code 中使用 PowerShell,插件 CodeShell 提供了对于 PowerShell 的支持. 安装 首先按 F1,打开命令窗口,输入安装插件的命 ...
- Java on Visual Studio Code的更新 – 2021年8月
Nick Senior Program Manager, Developer Division at Microsoft 大家好,欢迎来到 8 月版的 Visual Studio Code Java ...
- 【vscode高级玩家】Visual Studio Code❤️安装教程(最新版🎉教程小白也能看懂!)
目录 如果您在浏览过程中发现文章内容有误,请点此链接查看该文章的完整纯净版 下载 Linux Mac OS 安装 运行安装程序 同意使用协议 选择附加任务 准备安装 开始安装 安装完成 如果您在浏览过 ...
- 微软Visual Studio Code 0.8.0发布,新增多种主题
月30日,Build 开发者大会上,正式宣布了 Visual Studio Code 项目;并将其定义为:一个运行于 Mac OS X.Windows和 Linux 之上的,针对于编写现代 Web 和 ...
- Visual Studio Code 安装美化合集
这是一个关于VSCode编辑器的各种配置. 你可以在这里找到VSCode 的各种操作,如果这里找不到,请移步官方文档C++ programming with Visual Studio Code以及各 ...
- Java on Visual Studio Code的更新 – 2021年7月
Nick zhu, Senior Program Manager, Developer Division at Microsoft 大家好,欢迎来到 7 月版的 Visual Studio Code ...
- 在Visual Studio Code 运行 webpack ./src/main.js --output-filename ./dist/bundle.js --output-path . --mode development 提示 Module no t found:Error:Can't resolve' 'jquery' 是因为vs code还没安装jquery
在Visual Studio Code 运行 webpack ./src/main.js --output-filename ./dist/bundle.js --output-path . --mo ...
随机推荐
- 修改文件夹的所有者为www
切换到root用户:su - root 修改文件所属用户和用户组:chown 用户:用户组 文件名如果用户和用户组是www,那么需要执行命令如下:chown www:www filename -R ( ...
- Ant 学习
到了新公司,发现公司使用ant 来代码生成.本来学习后写下来.在网上找到一篇教程,实在是非常给力... 就把连接记下来吧:http://www.blogjava.net/amigoxie/archiv ...
- GDAL栅格矢量化
在这里主要提供直接能用的栅格矢量化代码,这个函数中路径输入为QStrng,如果是其他类型的,请直接转成const char *: bool Polygonize(const QString& ...
- 启动VMware出现报错:The VMware Authorization Service is not running
出现The VMware Authorization Service is not running.报错的根本原因是开机没有启动"VMware Authorization Service&q ...
- JS异常missing ) after argument list
JS异常报错 missing ) after argument list 在使用JS拼接DOM元素时,有这种情况发生,'<a onclick="del(' + data.id + ') ...
- Directed Roads CodeForces - 711D (基环外向树 )
ZS the Coder and Chris the Baboon has explored Udayland for quite some time. They realize that it co ...
- Python核心技术与实战——十六|Python协程
我们在上一章将生成器的时候最后写了,在Python2中生成器还扮演了一个重要的角色——实现Python的协程.那什么是协程呢? 协程 协程是实现并发编程的一种方式.提到并发,肯很多人都会想到多线程/多 ...
- Angular7和PrimeNg集成
常规操作之后,随便加了一个控件发现报错了.错误信息看起来是不能识别PrimeNg的组件,经过一番折腾发现.因为用到了ngModel,需要导入FormsModule.因为新建的工程没有导入,导入之后就好 ...
- MFC界面库BCGControlBar v30.1新功能详解:Dialogs和Forms
亲爱的BCGSoft用户,我们非常高兴地宣布BCGControlBar Professional for MFC和BCGSuite for MFC v30.1正式发布!此版本包含themed find ...
- Python之网路编程利用multiprocessing开进程
一.multiprocessing模块介绍 python中的多线程无法利用CPU资源,在python中大部分情况使用多进程.python中提供了非常好的多进程包multiprocessing. mul ...