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:
Describe the issue
When installing packages via Yarn, users see a warning about the
bareengine being invalid:This occurs because Yarn (and npm) only recognize standard engine names like
node,npm,yarn, etc. The custombareengine inpackage.jsontriggers this warning.Current engines field in package.json
"engines": {
"bare": ">=1.16.0"
}## Environment
Suggested fix
Add
nodeas 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
bareengine warning can be safely ignored when using Node.js.Impact
bare-fsis a transitive dependency oftar-fs, which is used bysharpand other popular packagesDependency chain example
Additional context
Similar issue may need to be filed for
bare-os: