nody-greeter icon indicating copy to clipboard operation
nody-greeter copied to clipboard

npm ci --production failing

Open LelouBil opened this issue 9 months ago • 0 comments

Environment

  • OS: Arch

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.

LelouBil avatar Sep 06 '23 18:09 LelouBil