Answer the question
In order to leave comments, you need to log in
Gulp does not run default task. What is the problem?
Good day! Please tell me what else could be the problem?
gulpfile.js:
const gulp = require('gulp');
gulp.task('default', function() {
console.log('DEFAULT')
});
PS C:\Users\User\myFolders\myWebDev\gulpBuild> gulp
PS C:\Users\User\myFolders\myWebDev\gulpBuild> gulp
gulp : Невозможно загрузить файл C:\Users\User\AppData\Roaming\npm\gulp.ps1, так как выполнение сценариев отк
лючено в этой системе. Для получения дополнительных сведений см. about_Execution_Policies по адресу https:/go
.microsoft.com/fwlink/?LinkID=135170.
строка:1 знак:1
+ gulp
+ ~~~~
+ CategoryInfo : Ошибка безопасности: (:) [], PSSecurityException
+ FullyQualifiedErrorId : UnauthorizedAccess
Answer the question
In order to leave comments, you need to log in
As a result, I did the following:
1. wiped everything that I had installed earlier.
2. reinstalled node and npm.
3. assigned gitbash in editor instead of cmd/powershell and executed:
npm install --global gulp-cli
then
npm init
later
npm install gulp
in galpfile:
const gulp = require('gulp');
gulp.task('default', function(cb) {
console.log('DEFAULT');
cb();
});
$ gulp
[19:28:36] Using gulpfile ~\myFolders\myWebDev\gulpBuild\gulpfile.js
[19:28:36] Starting 'default'...
DEFAULT
[19:28:36] Finished 'default' after 4.28 ms
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question