@Sorulai

Ошибка в выполнении npm start с зависимостями gulp?

Начала изучать gulp и все что связано с препроцессорами. Все шло хорошо, но столкнулась с такой проблемой,при запуске непосредственно через npm:
λ npm start

> pinki@1.0.0 start C:\Users\1\desktop\pinki
> npm run build && gulp serve


> pinki@1.0.0 build C:\Users\1\desktop\pinki
> gulp less

[01:03:14] Using gulpfile ~\desktop\pinki\gulpfile.js
[01:03:14] Starting 'less'...
[01:03:15] The following tasks did not complete: less
[01:03:15] Did you forget to signal async completion?
npm ERR! code ELIFECYCLE
npm ERR! errno 1
npm ERR! pinki@1.0.0 build: `gulp less`
npm ERR! Exit status 1
npm ERR!
npm ERR! Failed at the pinki@1.0.0 build script.
npm ERR! This is probably not a problem with npm. There is likely additional logging output above.

npm ERR! A complete log of this run can be found in:
npm ERR!     C:\Users\1\AppData\Roaming\npm-cache\_logs\2019-11-08T22_03_15_595Z-debug.log
npm ERR! code ELIFECYCLE
npm ERR! errno 1
npm ERR! pinki@1.0.0 start: `npm run build && gulp serve`
npm ERR! Exit status 1
npm ERR!
npm ERR! Failed at the pinki@1.0.0 start script.
npm ERR! This is probably not a problem with npm. There is likely additional logging output above.

npm ERR! A complete log of this run can be found in:
npm ERR!     C:\Users\1\AppData\Roaming\npm-cache\_logs\2019-11-08T22_03_15_828Z-debug.log


При этом команды gulp работают.
Прикладываю файлы:
gulpfile.js

var gulp = require("gulp");
var less = require("gulp-less");
var plumber = require("gulp-plumber");
var postcss = require("gulp-postcss");
var autoprefixer = require("autoprefixer");
var server = require("browser-sync").create();

gulp.task("less", function() {
	gulp.src("less/style.less")
	.pipe(plumber())
	.pipe(less())
	.pipe(postcss([
		autoprefixer()

		]))
	.pipe(gulp.dest("build/css"))
	.pipe(server.stream());
});

gulp.task("serve", gulp.series("less"), function(){
server.init({
	server: "build/"
});

gulp.watch("less/**/*.less", gulp.series("less"));
gulp.watch("build/*.html")
	.on("change", server.reload);
});


И файл
package.json


{
  "name": "pinki",
  "version": "1.0.0",
  "description": "",
  "main": "index.js",
  "scripts": {
    "test": "echo \"Error: no test specified\" && exit 1",
    "start": "npm run build && gulp serve",
    "build": "gulp less"
  },
  "author": "",
  "license": "ISC",
  "devDependencies": {
    "browser-sync": "^2.26.7",
    "eslint": "^6.6.0",
    "gulp": "^4.0.2",
    "gulp-autoprefixer": "^7.0.1",
    "gulp-plumber": "^1.2.1",
    "gulp-postcss": "^8.0.0",
    "stylelint": "^11.1.1"
  },
  "dependencies": {
    "gulp-less": "^4.0.1"
  }
}


Если нужно,приложу дебаг.
Я искала везде, читала форумы, но ничего внятного не нашла, добавляла path, пыталась изменить память у js файлов, удаляла npm кэш,все тщетно.
Сижу второй день с этим, возможно тут есть ,то что я не в состоянии найти, помогите пожалуйста.
  • Вопрос задан
  • 942 просмотра
Решения вопроса 1
delphinpro
@delphinpro Куратор тега Gulp.js
frontend developer
[01:03:15] The following tasks did not complete: less
[01:03:15] Did you forget to signal async completion?


Прямым же текстом спрашивают: Did you forget to signal async completion?

return gulp.src("less/style.less")
Ответ написан
Пригласить эксперта
Ваш ответ на вопрос

Войдите, чтобы написать ответ

Войти через центр авторизации
Похожие вопросы