parcel: /bin/sh: lscpu: not found on Alpine Linux
🐛 bug report
Parcel works fine but gives lscpu: not found
warning on Alpine Linux.
🎛 Configuration (.babelrc, package.json, cli command)
parcel index.html
{
"presets": ["@babel/preset-env"]
}
🤔 Expected Behavior
There should be no warnings.
😯 Current Behavior
⠋ Building.../bin/sh: lscpu: not found
💁 Possible Solution
Use something more widespread than lscpu that will be available in Alpine Linux.
🔦 Context
Parcel works fine, not sure whether it affects me in any practical way.
💻 Code Sample
🌍 Your Environment
Software | Version(s) |
---|---|
Parcel | 1.10.0-beta.1 |
Node | 10.10.0 |
npm/Yarn | 6.4.1 |
Operating System | Alpine Linux |
About this issue
- Original URL
- State: closed
- Created 6 years ago
- Reactions: 7
- Comments: 17 (3 by maintainers)
@DeMoorJasper I think it worth adjusting this error with message like:
So that user will not get confused with that and won’t go and post yet another issue on Github.
it’s just an environment variable, on linux/macos you can do
PARCEL_WORKERS=1 parcel build src/index.html
I agree a warning would be way more user friendly.
Another workaround that hasn’t been mentioned here but I’ll add it for reference: if you know what the cpu count is on your machine you can set the environment variable
PARCEL_WORKERS
to that amount or justPARCEL_WORKERS=1
as a safe option. If this is set, then Parcel doesn’t try to detect the cpu count itself and it will never attempt to runlscpu
. Here it is in the docs.@DeMoorJasper
From the console output, we cannot tell whether it’s an error or warning. It makes me nervous when I see this (I was building a docker image).
Is there anything working differently when it falls back to
os.cpus
? If not, I think there’s no need to show even a warning.This warning comes from a dependency and not Parcel itself.
Agree. Actually, I just saw that #2555 is also open and contains more technical discussion/possible changes.
@louh your error is not
/bin/sh: lscpu: not found
. That’s harmless. Your error isCan't read /app/browserslist config
.