Closed albinotonnina closed 6 years ago
The problem is with physical-cpu-count
. I can make a pull request to remove that package and use the else branch:
const os = require('os');
let amount;
const cores = os.cpus().filter(function(cpu, index) {
const hasHyperthreading = cpu.model.includes('Intel');
const isOdd = index % 2 === 1;
return !hasHyperthreading || isOdd;
});
amount = cores.length;
module.exports = amount;
Could add that somewhere in there: https://github.com/parcel-bundler/parcel/blob/master/src/WorkerFarm.js#L27
@reel Please do!
has been fixed in #142
this is still happening in version 1.9.7 and still fails to create the dist folder
I'm having this same problem but on App Engine on Google Cloud Platform, using middleware to bundle through Express.
I got this issue just now when creating a docker image from node 8.10.0 alpine. (parcel 1.9.7) Although, it doesn't stop the bundling, but I don't see the progress for that npm command after this error.
I have a similar problem with 1.9.7
Any update on this? I can try and recreate tonight and see the error from GCP App Engine
Anything? v1.9.7 on Heroku: lscpu: failed to determine number of CPUs: /sys/devices/system/cpu/possible: No such file or directory
@gabsinator in the meantime this is being solved, you can set the following in your Heroku config vars: PARCEL_WORKERS=1
I'm getting a similar error from zeit/now-cli build
. Could be related.
> /bin/sh: lscpu: not found
> � No entries found.
> at Bundler.bundle (/home/nowuser/src/node_modules/parcel-bundler/src/Bundler.js:260:17)
> at <anonymous>
> npm ERR! code ELIFECYCLE
> npm ERR! errno 1
> npm ERR!
> npm ERR! jessehattabaugh-com@0.0.2 build: `PARCEL_WORKERS=0 npm run clean && parcel build -d public src/*.html`
Getting the same error as @gabsinator on Parcel 1.11.0.
Tried adding PARCEL_WORKERS=1 and now parcel build
hangs indefinitely, but seems to work locally.
Please reopen. This issue is not fixed.
Using Heroku, same problem
2019-02-22T15:26:00.568594+00:00 app[web.1]: > parcel build ./client/index.html
2019-02-22T15:26:00.568595+00:00 app[web.1]:
2019-02-22T15:26:01.610727+00:00 app[web.1]: lscpu: failed to determine number of CPUs: /sys/devices/system/cpu/possible: No such file or directory
2019-02-22T15:26:23.419944+00:00 heroku[web.1]: State changed from starting to crashed
2019-02-22T15:26:23.401121+00:00 heroku[web.1]: Process exited with status 1
This is an error that seems to occur with the node-sass
package. Try installing dart-sass
instead; they're idempotent.
At least, that was the issue for myself and a couple other people.
Try clearing build cache using heroku-repo
I had the same repository deployed on an existing and fresh heroku app -- the older one with history of deploy was not loading client-side js, new one was.
Cleared it out of existing, and voila.
None of the solutions work.
In parcel the cpu count would be used to determine the number of workers to spawn for the build. If you still have this problem you can try to set PARCEL_WORKERS environment variable to 2 (worked for me) and the lscpu path will be omitted altogether while deploying on Heroku.
I am getting this error too while deploying a Parcel built app on Heroku. Tried all the above solutions. config var PARCEL_WORKERS is set to 1
lscpu: failed to determine number of CPUs: /sys/devices/system/cpu/possible: No such file or directory
@albinotonnina : How did you fixed your issue? Could you please share your solution? Might work for someone else too...
🐛/🙋 not sure.
My plan was to build my app on heroku and statically serve the dist folder
package.json
Procfile
server.js
Now I'm not an expert on heroku so errors like these are not clear to me. Locally, through heroku CLI everything works. On heroku looks like that the output folder
dist
is not actually created. I may be doing something wrong on heroku but it could be something related to parcel and CPUs? As a result I get a 404 on heroku.Dist
folder here is in the repo hence it works: https://scrollytelling.herokuapp.com https://github.com/albinotonnina/scrollytelling