Skip to content

TypeError: Cannot define property Symbol(graceful-fs.queue), object is not extensible #245

@niieani

Description

@niieani

When used in an ESM context, node:fs module is not extensible.
graceful-fs tries to define a Symbol property on the fs namespace here:

function publishQueue(context, queue) {
Object.defineProperty(context, gracefulQueue, {
get: function() {
return queue
}
})
}

This causes a TypeError:

Object.defineProperty(context, gracefulQueue, {
         ^

TypeError: Cannot define property Symbol(graceful-fs.queue), object is not extensible

Would be best if the check were to be implemented differently, rather than defining a property on node's fs module.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions