Skip to content
This repository was archived by the owner on Aug 11, 2021. It is now read-only.
This repository was archived by the owner on Aug 11, 2021. It is now read-only.

require is not a function #63

@ekkis

Description

@ekkis

fstream relies on graceful-fs, which itself relies on natives, the latter which is broken with the following error:

/webpack:/node_modules/natives/index.js:45
    whitelist.forEach(function (id) {
^
TypeError: require is not a function
    at /webpack:/node_modules/natives/index.js:50:1
    at Array.forEach (<anonymous>)
    at Object.req [as require] (/webpack:/node_modules/natives/index.js:45:1)
    at Object.8956 (/webpack:/node_modules/graceful-fs/fs.js:1:1)
    at __webpack_require__ (/webpack:/webpack/bootstrap:19:1)
    at Object.2242 (/webpack:/node_modules/graceful-fs/graceful-fs.js:3:1)
    at __webpack_require__ (/webpack:/webpack/bootstrap:19:1)
    at Object.7402 (/webpack:/node_modules/fstream/lib/reader.js:4:1)
    at __webpack_require__ (/webpack:/webpack/bootstrap:19:1)
    at Object.7821 (/webpack:/node_modules/fstream/fstream.js:2:1)

I've posted an issue on the graceful-fs board asking them to fix it: isaacs/node-graceful-fs#156 but I'm wondering if this module has a good reason to be using graceful-fs or it could rely instead on the built-in (and therefore very well tested) fs, which has better sense than to use a clearly unreliable package like 'natives'

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