Skip to content

ESM compatibility #80

Open
Open
@FND

Description

@FND

recent versions of Node (since v13?) refuse to load faucet.config.js for ESM projects, i.e. such with "type": "module" in package.json:

Warning: require() of ES modules is not supported.
require() of …/faucet.config.js from …/node_modules/faucet-pipeline-core/lib/config.js is an ES module file as it is a .js file whose nearest parent package.json contains "type": "module" which defines all .js files in that package scope as ES modules.
Instead rename faucet.config.js to end in .cjs, change the requiring code to use import(), or remove "type": "module" from package.json.

renaming the config file (i.e. faucet -c faucet.config.cjs) is a viable workaround, but not very satisfying

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