Skip to content

NodeJS 22 breaks vinyl-js #350

@maximilianschmid

Description

@maximilianschmid

What were you expecting to happen?

The task should copy the files

What actually happened?

The task throws an error and does not copy files

var gulp = require(‘gulp');

gulp.task('copyMailTemplates', () => {
  return gulp.src(['./src/templates/source/**/*.handlebars.html'])
    .pipe(gulp.dest('_temp/server/templates/source/'))
})

Terminal output / screenshots

>  npx gulp copyMailTemplates

[12:46:09] Using gulpfile ~/extendedbrain/planfred/server/gulpfile.js
[12:46:09] Starting 'copyMailTemplates'...
[12:46:09] 'copyMailTemplates' errored after 13 ms
[12:46:09] TypeError: Cannot assign to read only property 'atime' of object '#<Stats>'
    at onFutimes (/Users/milian/extendedbrain/planfred/server/node_modules/vinyl-fs/lib/file-operations.js:278:27)
    at FSReqCallback.oncomplete (node:fs:188:23)
    at FSReqCallback.callbackTrampoline (node:internal/async_hooks:130:17)

Please provide the following information:

  • MacOS Sonoma 14.4.1]:
  • node version 22.0.0:
  • npm version 10.5.2
  • gulp version
    CLI version: 3.0.0
    Local version: 5.0.0

Additional information

The problem started to occur in NodeJS 22.0.0. The last 21.x dev was working.

I think this problem relates to this change in NodeJS 22

[6f504b71ac] - buffer: use simdutf for atob implementation (Yagiz Nizipli) #52381

How to patch this issue?

Patch file
/vinyl-fs/lib/file-operations.js

uncomment lines 278, 779 and 284,285

CleanShot 2024-04-25 at 12 52 07

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions