grunt:间歇性构建失败“无法写入映射文件错误代码:UNKONWN”

问题描述

我有2个目标的javascript版本。它主要使用concat来创建整体图和地图。第二个目标无法建立约20%的时间。在其余时间中,它构建良好。我怀疑存在某种类型的并发访问问题,但是我不确定这是什么。第二个目标中的所有源文件都不是第一个目标的输出。 Windows 10计算机。我的实际项目中有约30个源文件

输出为:

C:\Users\Daddy\Documents\GitHub\VexflowEditor>grunt
Running "concat:dist" (concat) task   Running "concat:tests" (concat) task
Warning: Unable to write "build/mySecondTarget.js.map" file (Error
code: UNKNowN). Use --force to continue.

由于警告而中止。

这是我的咕unt声文件

grunt.initConfig({
        pkg: grunt.file.readJSON('package.json'),concat: {
            options: {
                separator: ';',sourceMap: true
            },dist: {
              src:['src/myFirstSource.js],dest: 'build/<%= pkg.name %>.js'
            },tests: {
              src:['src/mySecondSource.js']
              dest: 'build/mySecondTarget.js'
            }
        copy: {
            dist: {
                files: [{
                        expand: true,cwd: 'src/styles/',src: ['*.*','**/*'],dest: 'build/styles/'
                    }]
             }
          }
    });
    grunt.loadNpmtasks('grunt-contrib-concat');
    grunt.loadNpmtasks('grunt-contrib-copy');
    grunt.registerTask('default',['concat','copy']);
}

解决方法

暂无找到可以解决该程序问题的有效方法,小编努力寻找整理中!

如果你已经找到好的解决方法,欢迎将解决方案带上本链接一起发送给小编。

小编邮箱:dio#foxmail.com (将#修改为@)