A
A
Aleks Kirilov2020-02-03 14:42:09
gulp.js
Aleks Kirilov, 2020-02-03 14:42:09

It gives an error, could you help?

There is a code:

let gulp = require('gulp'),
    sass = require('gulp-sass');


gulp.task('scss', function() {
  return gulp.src('app/scss/**/*.scss')
    .pipe(sass())
    .pipe(gulp.dest('app/css'))
});

Выдает ошибку в консоли после прописания вот такого кода:
PS D:\Программирование\gulp-start> gulp scss
gulp : Невозможно загрузить файл C:\Users\Professional\AppData\Roaming\npm\gulp.ps1, так как выполнение сценариев отклю
чено в этой системе. Для получения дополнительных сведений см. about_Execution_Policies по адресу https:/go.microsoft.c
om/fwlink/?LinkID=135170.
строка:1 знак:1
+ gulp scss
+ ~~~~
    + CategoryInfo          : Ошибка безопасности: (:) [], PSSecurityException
    + FullyQualifiedErrorId : UnauthorizedAccess

Answer the question

In order to leave comments, you need to log in

2 answer(s)
D
Dante449, 2020-02-03
@anton12333

Solution:
Open terminal as admin.
We write and run: Set-ExecutionPolicy RemoteSigned
We answer the question: Yes (Yes for everyone)

N
nkknnkknnkkn, 2021-09-30
@nkknnkknnkkn

in the start, enter PowerShell
, then right-click run as administrator
Set-ExecutionPolicy -ExecutionPolicy RemoteSigned -Scope CurrentUser
Yes (namely Y)
and everything works!

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question