1
so people installed Grunt here and when I run the Grunt command appears this
unglify targets found error
Warning: task "unglify" failed. use --force to continue
my gruntfile.js is so
module.exports = function(grunt) {
grunt.initConfig({
pkg: grunt.file.readJSON('package.json'),
});
grunt.loadNpmTasks('grunt-contrib-uglify');
// Default task(s).
grunt.registerTask('default', ['uglify']);
};
and package.json like this
{
"name": "portifolio2",
"version": "1.0.0",
"description": "versao final portifolio",
"main": "bootstrap.min.js",
"scripts": {
"test": "echo \"Error: no test specified\" && exit 1"
},
"repository": {
"type": "git",
"url": "git+https://github.com/fernandoRj/portifolio2.git"
},
"author": "",
"license": "ISC",
"bugs": {
"url": "https://github.com/fernandoRj/portifolio2/issues"
},
"homepage": "https://github.com/fernandoRj/portifolio2#readme",
"devDependencies": {
"grunt": "^1.0.1",
"grunt-contrib-connect": "^1.0.2",
"grunt-contrib-imagemin": "^1.0.1",
"grunt-contrib-jshint": "^1.1.0",
"grunt-contrib-uglify": "^2.0.0"
}
}
so thank you guys who answered the error was here
grunt.loadNpmTasks('grunt-contrib-uglify');
// Default task(s).
grunt.registerTask('default', ['uglify']);
I traded for it
grunt.registerTask('default',[]);
Which files you want to compress?
– Sergio
thanks for trying to help, I solved the error the way I edited the post
– Fernando Alcantara
Fernando, two things:
#1
Your solution was to hide the problem, which means without uglify it doesn’t compress the files. Then I wonder if it’s worth having Grunt, since he’s not running any task.#2
when you find a solution put as answer, in the field of the answers below, and not changing the question in question with answer included.– Sergio