Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

评论:使用 gulp 编译 Sass #15

Closed
nimoc opened this issue Apr 6, 2015 · 17 comments
Closed

评论:使用 gulp 编译 Sass #15

nimoc opened this issue Apr 6, 2015 · 17 comments
Labels

Comments

@nimoc
Copy link
Owner

nimoc commented Apr 6, 2015

请在此处留下你对 使用 gulp 编译 Sass 的评论

@nimoc nimoc added the 评论 label Apr 6, 2015
@nimoc nimoc changed the title 评论:使用 gulp 编译 LESS 评论:使用 gulp 编译 Sass Apr 6, 2015
@a958330481
Copy link

按照如上说明去配置gulp sass(gulp-ruby-sass版本号:2.0.0),执行时出现下面错误信息:

Error: Cannot find module './utils'
at Function.Module._resolveFilename (module.js:336:15)
at Function.Module._load (module.js:278:25)
at Module.require (module.js:365:17)
at require (module.js:384:17)
at Object.<anonymous> (F:\gulp\node_modules\gulp-ruby-sass\logger.js:3:15)
at Module._compile (module.js:460:26)
at Object.Module._extensions..js (module.js:478:10)
at Module.load (module.js:355:32)
at Function.Module._load (module.js:310:12)
at Module.require (module.js:365:17)
at require (module.js:384:17)

求解?

@nimoc
Copy link
Owner Author

nimoc commented Sep 10, 2015

请先试试

npm install gulp-ruby-sass@1.0.1

@luqin
Copy link

luqin commented Sep 10, 2015

目前在使用gulp-sass编译scss文件,有没有与gulp-ruby-sass的详细对比文章?

@nimoc
Copy link
Owner Author

nimoc commented Sep 10, 2015

恩,gulp-sass 比gulp-ruby-sass 要快。gulp-ruby-sass 是用ruby编译的,功能要全。

@luqin
Copy link

luqin commented Sep 10, 2015

主要原因是 gulp-sass 不用装 ruby,但是,依赖包 node-sass 在国内下载经常失败

@a958330481
Copy link

@uooo 关于gulp-sass与gulp-ruby-sass对比的文章,推荐看下这篇:
http://segmentfault.com/a/1190000003112509

@a958330481
Copy link

@nimojs 谢谢~ 我换成了用gulp-sass已经解决问题,现在改用你的建议重新试下

@luqin
Copy link

luqin commented Sep 11, 2015

gulp-sass 依赖底层的 c++ 构建的二进制文件,可以通过在本地设置环境变量缓存,这样就不用重新下载。具体参考 node-sass 的github

@nimoc
Copy link
Owner Author

nimoc commented Sep 11, 2015

ruby sass 坑还是挺大的,周末我还是要把教程中的 gulp-ruby-sass 换成 gulp-sass

@a958330481
Copy link

换成 gulp-ruby-sass@1.0.1 之后,运行变得正常,那个错误应该是由于gulp-ruby-sass版本不同引起的

@luqin
Copy link

luqin commented Sep 11, 2015

目前 gulp-sass 相对来说已经可用了,可以尝试尝试

@ivvvy
Copy link

ivvvy commented Jan 21, 2016

无法显示task如图所示该怎么解决!
qq 20160121125635

@nimoc
Copy link
Owner Author

nimoc commented Jan 21, 2016

@ivvvy 目测 node-sass npm install 时没有编译成功

跟 node 版本有关系,我同事经常遇到这个问题。最后只能换 node 版本解决。

@luqin
Copy link

luqin commented Jan 21, 2016

node-sass 安装失败解决方案
在公司我是搭了一个 node-sass 下载包代理服务器,
不过没有在文档补充,相信对于大家来说是小菜一碟。

@ivvvy
Copy link

ivvvy commented Jan 21, 2016

@nimojs 我要重新再装吗

@nimoc
Copy link
Owner Author

nimoc commented Jan 22, 2016

@ivvvy 这是个坑,我同事解决这个问题都是一次一次的换版本重装。

@ivvvy
Copy link

ivvvy commented Jan 22, 2016

@nimojs 这。。。

@nimoc nimoc closed this as completed Oct 5, 2016
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

4 participants