V
V
Vasya Nikolaev2018-05-08 19:02:35
gulp.js
Vasya Nikolaev, 2018-05-08 19:02:35

Gulp4 not working in Sublime Text 3?

When I run gulp from ST3 I get this log

Remember that you can report errors and get help in https://github.com/NicoSantangelo/sublime-gulp

05-08-2018 18:54:
C:\Users\***\AppData\Roaming\Sublime Text 3\Packages\Gulp\write_tasks_to_cache.js:31
        throw ex;
        ^

ReferenceError: gulp is not defined
    at Object.<anonymous> (D:\!!!Study\!gulp4template\.sublime-gulp-tmp.js:31:23)
    at Module._compile (module.js:641:30)
    at Object.Module._extensions..js (module.js:652:10)
    at Module.load (module.js:560:32)
    at tryModuleLoad (module.js:503:12)
    at Function.Module._load (module.js:495:3)
    at Module.require (module.js:585:17)
    at require (internal/module.js:11:18)
    at requireGulp (C:\Users\***\AppData\Roaming\Sublime Text 3\Packages\Gulp\write_tasks_to_cache.js:28:16)
    at Object.<anonymous> (C:\Users\***\AppData\Roaming\Sublime Text 3\Packages\Gulp\write_tasks_to_cache.js:83:12)


05-08-2018 18:57:
C:\Users\***\AppData\Roaming\Sublime Text 3\Packages\Gulp\write_tasks_to_cache.js:31
        throw ex;
        ^

ReferenceError: gulp is not defined
    at Object.<anonymous> (D:\!!!Study\!gulp4template\.sublime-gulp-tmp.js:31:23)
    at Module._compile (module.js:641:30)
    at Object.Module._extensions..js (module.js:652:10)
    at Module.load (module.js:560:32)
    at tryModuleLoad (module.js:503:12)
    at Function.Module._load (module.js:495:3)
    at Module.require (module.js:585:17)
    at require (internal/module.js:11:18)
    at requireGulp (C:\Users\**\AppData\Roaming\Sublime Text 3\Packages\Gulp\write_tasks_to_cache.js:28:16)
    at Object.<anonymous> (C:\Users\***\AppData\Roaming\Sublime Text 3\Packages\Gulp\write_tasks_to_cache.js:83:12)

Here is gulfile.js:
global.$ = {
    path: {
        task: require('./gulp/paths/tasks.js')
    },
    gulp: require('gulp'),
    del: require('del'),
    fs: require('fs'),
    browserSync: require('browser-sync').create(),
    gp: require('gulp-load-plugins')()
};

$.path.task.forEach(function(taskPath) {
    require(taskPath)();
});

$.gulp.task('dev', $.gulp.series(
    'clean',
    $.gulp.parallel('styles:dev', 'pug', 'libsJS:dev', 'js:copy', 'svg', 'img:dev', 'fonts','svg:copy')));

$.gulp.task('build', $.gulp.series(
    'clean',
    $.gulp.parallel('styles:build', 'pug', 'libsJS:build', 'js:copy', 'svg', 'img:build', 'fonts','svg:copy')));

$.gulp.task('default', $.gulp.series(
    'dev',
    $.gulp.parallel(
        'watch',
        'serve'
    )
));

Galp version CLI version 2.0.1
Local version 4.0.0-alpha.2
What's the matter, tell me pliz.

Answer the question

In order to leave comments, you need to log in

1 answer(s)
N
Nikolai Shabalin, 2018-05-08
@nikolayshabalin

does not see gulp. Try
[sudo] npm i -g [email protected]

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question