JezerM / nody-greeter

LightDM greeter that allows to create wonderful themes with web technologies. Made in Node.js
https://web-greeter-page.vercel.app
GNU General Public License v3.0
125 stars 8 forks source link

npm ci --production failing #48

Closed LelouBil closed 1 month ago

LelouBil commented 1 year ago

Environment

Bug description

When building (at least on a Hyper-V Virtual machine where I am testing) I always get this error when doing npm run build

Building with prefix: /usr
Bindings copied
✔ Bindings compiled succesfully
Resources copied
Installing packages with 'npm ci --production -s'
Error: Command failed: npm ci --production -s
    at checkExecSyncError (node:child_process:871:11)
    at Object.execSync (node:child_process:943:15)
    at create_build (/home/crylia/nody-greeter/build.js:157:19)
    at process.processTicksAndRejections (node:internal/process/task_queues:95:5)
    at async build (/home/crylia/nody-greeter/build.js:352:3) {
  status: 1,
  signal: null,
  output: [ null, null, null ],
  pid: 135427,
  stdout: null,
  stderr: null
}

but this only started to happen the second time I built the package !

Steps to reproduce

clone the repository and follow the instructions

Expected behavior

normal build

However, I have additional info, I edited build.js to remove the "-s" to see the npm error, and it complained about a missing package-lock.json

Then I added a "ls -la" call right above the "npm ci" and it showed the package.json and package-lock.json files both empty at kb ! When checking manually after the build command, the files had the correct content.

I'm suspecting some kind of race condition here.

JezerM commented 1 month ago

Hi! This should be fixed in the latest release. If you encounter this issue again, reopen the issue.

Also, if npm ci fails, you can always run the build step again with npm run build.