grunt:我在 package.json 中遇到了一些错误

grunt: I am having some errors in package.json

我有任务 运行 探索,我在我的解决方案中安装了 grunt。我在 package.json 中收到一些错误,但我不明白,因为我曾经创建它 npm init.

错误是:

序列不包含任何元素:

Failed to run "C:\_DEVELOP\C#\my_circle\my_circle\package.json"...
Sequence contains no elements
Failed to run "C:\_DEVELOP\C#\my_circle\my_circle\Gruntfile.js"...
cmd.exe /c grunt -b "C:\_DEVELOP\C#\my_circle\my_circle" --gruntfile "C:\_DEVELOP\C#\my_circle\my_circle\Gruntfile.js" --tasks "C:\Program Files (x86)\Microsoft Visual Studio 14.0\Common7\IDE\Extensions\Microsoft\Web Tools\TaskRunnerExplorer\Scripts" vs-grunt-task-reader

Failed to run "C:\_DEVELOP\C#\my_circle\my_circle\package.json"...
Sequence contains no elements

是当我把combo改成0的时候用GruntFile.js.

在 node_modules 我已经安装了:grunt-cli, grunt-contrib-jshint, grunt-contrib-uglify, grunt-contrib-watch,它们在 node_modules 项目级别内。

我的GruntFile.js是:

/// <binding Clean='uglify, watch' />
module.exports = function ( grunt )
{
    var bannerContent = '/*********************************************************\n' +
                        ' my_circle ' +
                        ' ==> Fecha subida:' +
                        ' <%= grunt.template.today("dd-mm-yyyy hh:MM") %>\n ' +
                        '*********************************************************/\n\n';

    //definir las tareas
    grunt.initConfig( {

        uglify: {
            options: {
                spawn: false,
                compress: false,
                mangle: false,
                beautify: true,
                banner: bannerContent
            },
            js: {
                src: ["Scripts/*.js"],
                dest: "Scripts/output.min.js"
            }
        }


    } );
    //para cargar los plugins 
    grunt.loadNpmTasks( 'grunt-contrib-uglify' );

    //registrar los plugins a las tareas por defecto. si ejecuto grunt ejecuta por orden los siguientes plugins.
    grunt.registerTask( 'default', ['uglify'] );
};

我的代码有什么问题 package.json?

根据 Mads Kristensen 的说法,这是一个错误: https://github.com/madskristensen/NpmTaskRunner/issues/12

I've investigated the issue and there is nothing that can be done from this extension to fix it. The issue lies with the Task Runner Explorer extensibility code and I've opened an internal bug (176952) on the VS Web Team to fix it. Closing it here.

我看到了同样的行为