Ao tentar executar o comando:
npm run gulp build-img
A seguinte mensagem de erro está sendo exibida no terminal:
[22:05:52] Using gulpfile ~\Desktop\projeto\gulpfile.js
[22:05:52] Starting 'build-img'...
[22:05:52] Finished 'build-img' after 50 ms
events.js:160
throw er; // Unhandled 'error' event
^
Error: EPERM: operation not permitted, open 'C:\Users\Desktop\projeto\src\img\Thumbs.db at Error (native)
npm ERR! Windows_NT 6.3.9600
npm ERR! argv "C:\\Program Files\\nodejs\\node.exe" "C:\\Program Files\\nodejs\\node_modules\\npm\\bin\\npm-cli.js" "run" "gulp" "build-img"
npm ERR! node v6.10.3
npm ERR! npm v3.10.10
npm ERR! code ELIFECYCLE
npm ERR! projeto@1.0.0 gulp: `gulp "build-img"`
npm ERR! Exit status 1
npm ERR!
npm ERR! Failed at the projeto@1.0.0 gulp script 'gulp "build-img"'.
npm ERR! Make sure you have the latest version of node.js and npm installed.
npm ERR! If you do, this is most likely a problem with the projeto package,
npm ERR! not with npm itself.
npm ERR! Tell the author that this fails on your system:
npm ERR! gulp "build-img"
npm ERR! You can get information on how to open an issue for this project with:
npm ERR! npm bugs projeto
npm ERR! Or if that isn't available, you can get their info via:
npm ERR! npm owner ls projeto
npm ERR! There is likely additional logging output above.
npm ERR! Please include the following file with any support request:
npm ERR! C:\Users\Desktop\projeto\npm-debug.log
Arquivo package.json:
{
"name": "projeto",
"version": "1.0.0",
"main": "index.js",
"scripts": {
"test": "echo \"Error: no test specified\" && exit 1",
"gulp": "gulp"
},
"author": "",
"license": "ISC",
"devDependencies": {
"gulp": "^3.9.1",
"gulp-imagemin": "^3.2.0"
},
"dependencies": {
"gulp": "^3.9.0",
"gulp-imagemin": "^3.2.0",
"imagemin-gifsicle": "^5.1.0"
},
"description": ""
}
Arquivo gulpifile.js:
var gulp = require('gulp'),
imagemin = require('gulp-imagemin');
gulp.task('build-img', function(){
gulp.src('src/img/**/*')
.pipe(imagemin())
.pipe(gulp.dest('src/img'));
});
OBS: Precisei instalar o imagemin-gifsicle pois estava dando erro dizendo que o mesmo não estava instalado.
Será que alguém consegue me ajudar?