Skip to content

node:fs breaks --update-db on earlier node versions #35

@lharrison1313

Description

@lharrison1313

When running the below command on node version 14.16.0 we get the following error:

Command: npx browserslist@latest --update-db
Error:

Cannot find module 'node:fs'
Require stack:
/root/.npm/_npx/178/lib/node_modules/browserslist/node_modules/update-browserslist-db/index.js
/root/.npm/_npx/178/lib/node_modules/browserslist/cli.js

@ai
I believe this commit 2b56d5c switched the imports for all node libraries to the require(node:fs) format which may have broken it for older node versions. Could you potentially switch it back to the original form require(fs)?

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