generator-express
generator-express copied to clipboard
Gem error when trying to run gulp
Hello !
I'm using sass and ejs with this generator.
When I tried to launch gulp
i get this error:
$ gulp [15:49:46] Using gulpfile D:\workspace\eeeexpress\eeexpress\gulpfile.js [15:49:46] Starting 'sass'... [15:49:46] Starting 'develop'... [15:49:46] Finished 'develop' after 452 ms [15:49:46] Starting 'watch'... [15:49:46] Finished 'watch' after 7.91 ms [15:49:46] 'sass' is not recognized as an internal or external command, operable program or batch file.
events.js:141 throw er; // Unhandled 'error' event ^ Error: Gem undefined is not installed.
Could assist me please with this issue ?
gem install sass
: http://sass-lang.com/install
Hi @petecoop ! I've already installed ruby gem before using this generator. This is the reason why I created this issue.
Can you run sass
?
Yes I can:
Is it >= 3.4? Also check: https://github.com/sindresorhus/gulp-ruby-sass
Yes it is
i also get this error when i use gulp :
C:\wamp64\www\ProjectX> gulp [20:27:20] Using gulpfile C:\wamp64\www\ProjectX\gulpfile.js [20:27:20] Starting 'uglifyjs'... [20:27:20] Finished 'uglifyjs' after 23 ms [20:27:20] Starting 'minifycss'... [20:27:20] Finished 'minifycss' after 5.38 ms [20:27:20] Starting 'lesscss'... [20:27:20] Finished 'lesscss' after 2.82 ms [20:27:20] Starting 'sasscss'... [20:27:20] Finished 'sasscss' after 92 ms [20:27:20] Starting 'image'... [20:27:20] Finished 'image' after 2.9 ms [20:27:20] Starting 'copy'... [20:27:20] Finished 'copy' after 797 μs [20:27:20] Starting 'templates'... [20:27:20] Finished 'templates' after 111 ms [20:27:20] Starting 'watchjs'... [20:27:21] Finished 'watchjs' after 21 ms [20:27:21] Starting 'watchcss'... [20:27:21] Finished 'watchcss' after 1.79 ms [20:27:21] Starting 'watchless'... [20:27:21] Finished 'watchless' after 779 μs [20:27:21] Starting 'watchsass'... [20:27:21] Finished 'watchsass' after 3.66 ms [20:27:21] Starting 'watchimage'... [20:27:21] Finished 'watchimage' after 957 ms [20:27:21] Starting 'watchcopy'... [20:27:21] Finished 'watchcopy' after 2.86 ms [20:27:21] Starting 'watchtemplates'... [20:27:21] Finished 'watchtemplates' after 535 μs [20:27:21] Starting 'default'... [20:27:21] Finished 'default' after 32 μs
[20:27:22] 'sass' �����ڲ����ⲿ���Ҳ���ǿ����еij���
���������ļ��� Error! Gem undefined is not installed [20:27:50] gulp-imagemin: Minified 98 images (saved 322 kB - 9.1%)
In my PC:
ruby 2.3.3p222 (2016-11-21 revision 56859) [x64-mingw32]
Sass 3.5.5 (Bleeding Edge) node v8.9.3 gulp CLI version 3.9.1
someone who can help me
I'd really recommend using node sass instead of ruby sass, it has far less issues!
in fact,this problem appears in the development environment of node gulp-sass.
can you share your package.json?
{ "devDependencies": { "gulp": "^3.9.1", "gulp-autoprefixer": "^5.0.0", "gulp-declare": "^0.3.0", "gulp-handlebars": "^5.0.2", "gulp-imagemin": "^4.1.0", "gulp-less": "^4.0.0", "gulp-minify-css": "^1.2.4", "gulp-ruby-sass": "^3.0.0", "gulp-sass": "^3.1.0", "gulp-sourcemaps": "^2.6.4", "gulp-uglify": "^3.0.0", "gulp-util": "^3.0.8", "gulp-watch-path": "^0.1.0", "gulp-wrap": "^0.13.0", "stream-combiner2": "^1.1.1", "stream-consume": "^0.1.1" }, "name": "projectx", "version": "1.0.0", "main": "gulpfile.js", "scripts": { "test": "echo "Error: no test specified" && exit 1" }, "author": "", "license": "ISC", "description": "" }
in fact,gulp-ruby-sass has installed,but it doesn't work
still having this issue :(
What i found, that it was an issue with node version. Taking it back to node 8.1.4 solves it for me.