Do not try to find a target

I wrote the following grunt.js file

var _path = require('path'); module.exports = function (grunt) { var config = { }; function addProject(project) { grunt.helper('addProject', config, project); } addProject({ name:'mytest', type:'module', sourcePath:'../source', outputPath:'../test/', version : grunt.option('ver')||'0.1.0.0' }); grunt.registerTask('default', 'module closureCompiler'); grunt.initConfig(config); }; 

when I run it with a command in my bat bat module moduleCompiler, it gives an error saying

 Running "sync" task >> No "sync" targets found. <WARN> Task "sync" failed. Use --force 

What does it mean?

+4
source share
1 answer

As the error message indicates, you need to define the target for the sync task:

 grunt.initConfig({ sync: { target: {} // <= needs to be defined } }); 
+5
source

Source: https://habr.com/ru/post/1498721/


All Articles