gruntjs / grunt-contrib-copy

Copy files and folders.
http://gruntjs.com/
MIT License
726 stars 194 forks source link

node Assertion failed on copy #301

Open ghost opened 6 years ago

ghost commented 6 years ago

I think the error speaks for itself:

14-Aug-2018 12:55:50 | Running "copy:dist" (copy) task
14-Aug-2018 12:55:50 | Copied 21 files
14-Aug-2018 12:55:50 | grunt[13623]: ../src/node_contextify.cc:637:static void node::contextify::ContextifyScript::New(const v8::FunctionCallbackInfo<v8::Value>&): Assertion `args[1]->IsString()' failed.
14-Aug-2018 12:55:50 | 1: 0x8b8210 node::Abort() [grunt]
14-Aug-2018 12:55:50 | 2: 0x8b82e5  [grunt]
14-Aug-2018 12:55:50 | 3: 0x8eb237 node::contextify::ContextifyScript::New(v8::FunctionCallbackInfo<v8::Value> const&) [grunt]
14-Aug-2018 12:55:50 | 4: 0xb4daa8  [grunt]
14-Aug-2018 12:55:50 | 5: 0xb4fa12 v8::internal::Builtin_HandleApiCall(int, v8::internal::Object**, v8::internal::Isolate*) [grunt]
14-Aug-2018 12:55:50 | 6: 0x2e9184d841bd

The config is pretty basic:

    copy: {
      dist: {
        files: [{
          expand: true,
          dot: true,
          cwd: '<%= yeoman.app %>',
          dest: '<%= yeoman.dist %>',
          src: [
            '*.{ico,png,txt}',
            '*.html',
            'images/{,*/}*.{webp}',
            'assets/{,*/}*.*',
            'locale/{,*/}*.*',
            'styles/{,*/}*.*',
            'styles/fonts/{,*/}*.*'
          ]
        }, {
          expand: true,
          cwd: '.tmp/images',
          dest: '<%= yeoman.dist %>/images',
          src: ['generated/*']
        }, {
          expand: true,
          cwd: 'app/locale',
          src: '*',
          dest: '<%= yeoman.dist %>/locale',
        }, {
          expand: true,
          cwd: '.',
          src: 'bower_components/bootstrap-sass-official/assets/fonts/bootstrap/*',
          dest: '<%= yeoman.dist %>'
        },{
          expand: true,
          cwd: '.',
          src: 'bower_components/font-awesome/fonts/*',
          dest: '<%= yeoman.dist %>'
        }]
      },
      styles: {
        expand: true,
        cwd: '<%= yeoman.app %>/styles',
        dest: '.tmp/styles/',
        src: '{,*/}*.css'
      }
    },
$ npm version
{ npm: '6.3.0',
  ares: '1.14.0',
  cldr: '33.1',
  http_parser: '2.8.0',
  icu: '62.1',
  modules: '64',
  napi: '3',
  nghttp2: '1.32.0',
  node: '10.8.0',
  openssl: '1.1.0h',
  tz: '2018e',
  unicode: '11.0',
  uv: '1.22.0',
  v8: '6.7.288.49-node.19',
  zlib: '1.2.11' }

$ grep -A2 grunt-contrib-copy package-lock.json
    "grunt-contrib-copy": {
      "version": "1.0.0",
      "resolved": "https://registry.npmjs.org/grunt-contrib-copy/-/grunt-contrib-copy-1.0.0.tgz",
      "integrity": "sha1-cGDGWB6QS4qw0A8HbgqPbj58NXM=",
      "dev": true,
XhmikosR commented 6 years ago

Seems like a node issue. Does it happen anymore with node.js updated?

TomBecker-BD commented 5 years ago

Happens on my system with latest node.js LTS v10.16.3, grunt 1.0.4.

TomBecker-BD commented 5 years ago

Latest current node.js v12.12.0 also has the issue. Previous major LTS node.js v8.16.2 does not have the issue.