Skip to content

Yarn warning: The engine "bare" appears to be invalid #120

Description

@Srishailam

Describe the issue

When installing packages via Yarn, users see a warning about the bare engine being invalid:

warning bare-fs@4.5.2: The engine "bare" appears to be invalid.
warning bare-os@3.6.2: The engine "bare" appears to be invalid.

This occurs because Yarn (and npm) only recognize standard engine names like node, npm, yarn, etc. The custom bare engine in package.json triggers this warning.

Current engines field in package.json

"engines": {
"bare": ">=1.16.0"
}## Environment

  • bare-fs version: 4.5.2
  • bare-os version: 3.6.2
  • Yarn version: 1.22.22
  • Node.js version: 20.19.5

Suggested fix

Add node as an additional engine to indicate Node.js compatibility and suppress the warning:

"engines": {
"bare": ">=1.16.0",
"node": ">=18.0.0"
}Or use a comment/note in the README to clarify that the bare engine warning can be safely ignored when using Node.js.

Impact

  • This is a cosmetic issue - the packages work fine with Node.js
  • However, it creates noise in CI/CD logs and confuses users who see "invalid engine" warnings
  • Many projects are affected as bare-fs is a transitive dependency of tar-fs, which is used by sharp and other popular packages

Dependency chain example

@storybook/nextjs → sharp → tar-fs → bare-fs

Additional context

Similar issue may need to be filed for bare-os:

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

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