Error when executing grunt command

1

So I installed the grunt here and when I run the grunt command it appears

error on unglify targets found

  

warning: task "unglify" failed. use --force to continue

My gruntfile.js is like this

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 so

{
  "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 thanks guys, whoever answered the error was here

 grunt.loadNpmTasks('grunt-contrib-uglify');

  // Default task(s).
  grunt.registerTask('default', ['uglify']);

I switched to this

grunt.registerTask('default',[]);
    
asked by anonymous 27.01.2017 / 04:18

0 answers