Closed richvoronov closed 7 years ago
Can you log the error?
.on('error', err => {
console.log(err);
});
It does sound like a node version issue though. Can you verify that you're using 8.1.3
? Newer node versions produce a different error message for Buffer.from
than the one you provided.
Thank you, for answer. But мy problem disappeared after reinstallation Ubutntu. And now it work :)
2017-07-10 12:12 GMT+03:00 Kevin Mårtensson notifications@github.com:
Can you log the error?
.on('error', err => { console.log(err); });
— You are receiving this because you authored the thread. Reply to this email directly, view it on GitHub https://github.com/sindresorhus/gulp-autoprefixer/issues/84#issuecomment-314050454, or mute the thread https://github.com/notifications/unsubscribe-auth/AZayszIhrpBj-pIC12yWNr44_JNRUteSks5sMesJgaJpZM4OSDUZ .
Here we go down the rabbit hole
{ [TypeError: this is not a typed array.] name: 'TypeError', message: 'this is not a typed array.', stack: 'TypeError: this is not a typed array.\n at Function.from (native)\n at C:\Projects\Portal2\Src\Site\Eiip.Web\node_modules\gulp-autoprefixer\index.js:25:27\n at process._tickDomainCallback (node.js:444:9)', fileName: 'C:\Projects\Portal2\Src\Site\Eiip.Web\Content\map-widget.css', showStack: true, showProperties: true, plugin: 'gulp-autoprefixer' }
PM> node -v v6.11.5
Ok, here is the answer: https://stackoverflow.com/questions/43849585/update-node-version-in-visual-studio-2017
@xumix just wander, what is in your ‘C:\Projects\Portal2’ folder? :) I’m a fun of Portal2 game
@duzun oooops :) Not a game folder :)
Hello! Day ago I moved to Ubunutu from Windows 10 and only now I started configuring gulp for web development. Faced such a problem when start gulp:
`[15:31:33] Starting 'sass'... [15:31:33] Starting 'common-js'... [15:31:33] Starting 'browser-sync'... [15:31:33] Finished 'browser-sync' after 48 ms [15:31:33] Finished 'common-js' after 92 ms [15:31:33] Starting 'js'...
events.js:141 throw er; // Unhandled 'error' event ^ TypeError: this is not a typed array. at Function.from (native) at /media/richard/HDD/General/web/_dev/gulp.com/node_modules/gulp-autoprefixer/index.js:25:27 at process._tickCallback (node.js:356:9)`
my gulpfile.js
`var gulp = require('gulp'), gutil = require('gulp-util' ), sass = require('gulp-sass'), browserSync = require('browser-sync'), concat = require('gulp-concat'), uglify = require('gulp-uglify'), cleanCSS = require('gulp-clean-css'), rename = require('gulp-rename'), del = require('del'), imagemin = require('gulp-imagemin'), cache = require('gulp-cache'), autoprefixer = require('gulp-autoprefixer'), ftp = require('vinyl-ftp'), notify = require("gulp-notify");
gulp.task('common-js', function() { return gulp.src([ 'app/js/common.js', ]) .pipe(concat('common.min.js')) .pipe(uglify()) .pipe(gulp.dest('app/js')); });
gulp.task('js', ['common-js'], function() { return gulp.src([ 'app/libs/jquery/dist/jquery.min.js', 'app/js/common.min.js', // Всегда в конце ]) .pipe(concat('scripts.min.js')) .pipe(uglify()) .pipe(gulp.dest('app/js')) .pipe(browserSync.reload({stream: true})); });
gulp.task('browser-sync', function() { browserSync({ proxy: 'http://localhost/app', notify: false, // tunnel: true, // tunnel: "projectmane", }); });
gulp.task('sass', function() { return gulp.src('app/sass/*/.sass') .pipe(sass({outputStyle: 'expand'}).on("error", notify.onError())) .pipe(rename({suffix: '.min', prefix : ''})) .pipe(autoprefixer(['last 15 versions'])) // .pipe(cleanCSS()) .pipe(gulp.dest('app/css')) .pipe(browserSync.reload({stream: true})); });
gulp.task('watch', ['sass', 'js', 'browser-sync'], function() { gulp.watch('app/sass/*/.sass', ['sass']); gulp.watch(['libs/*/.js', 'app/js/common.js'], ['js']); gulp.watch('app/*.php', browserSync.reload); });
gulp.task('imagemin', function() { return gulp.src('app/img/*/') .pipe(cache(imagemin())) .pipe(gulp.dest('dist/img')); });
gulp.task('build', ['removedist', 'imagemin', 'sass', 'js'], function() {
});
gulp.task('deploy', function() {
});
gulp.task('removedist', function() { return del.sync('dist'); }); gulp.task('clearcache', function () { return cache.clearAll(); });
gulp.task('default', ['watch']); ` it is screen at "/media/richard/HDD/General/web/_dev/gulp.com/node_modules/gulp-autoprefixer/index.js"
Nodejs version 8.1.3 auro-prefixer 4.0.0
How can I solve this problem? thx