anvilco/spectaql

npm install (2.2.0 is current latest) errors out

connorpwilliams opened this issue · 12 comments

Command ran npm i spectaql

Error output:

npm WARN deprecated opn@6.0.0: The package has been renamed to `open`
npm ERR! code 1
npm ERR! path E:\workspace\Playground\SpectaQL\node_modules\spectaql
npm ERR! command failed
npm ERR! command C:\Windows\system32\cmd.exe /d /s /c npm run build:vendor
npm ERR! > spectaql@2.2.0 build:vendor
npm ERR! > node bin/build-vendor.mjs
npm ERR!
npm ERR! Building managed vendor dependency: grunt-compile-handlebars
npm ERR! node:internal/errors:863
npm ERR!   const err = new Error(message);
npm ERR!               ^
npm ERR!
npm ERR! Error: Command failed: tar --strip-components 1 -C E:\workspace\Playground\SpectaQL\node_modules\spectaql\vendor\grunt-compile-handlebars -xvf E:\workspace\Playground\SpectaQL\node_modules\spectaql\vendor\grunt-compile-handlebars-1.0.0.tgz
npm ERR!     at checkExecSyncError (node:child_process:871:11)
npm ERR!     at execSync (node:child_process:943:15)
npm ERR!     at file:///E:/workspace/Playground/SpectaQL/node_modules/spectaql/bin/build-vendor.mjs:115:11 {
npm ERR!   status: 128,
npm ERR!   signal: null,
npm ERR!   output: [ null, Buffer(0) [Uint8Array] [], null ],
npm ERR!   pid: 210908,
npm ERR!   stdout: Buffer(0) [Uint8Array] [],
npm ERR!   stderr: null
npm ERR! }
npm ERR!
npm ERR! Node.js v18.12.1

Edit
npm i spectaql@2.1.1 - Fails
npm i spectaql@2.0.9 - Succeeds

Edit 2: (Keeping info together)
Seems the issue might be related to installing on windows. Below comments have confirmed that the install works on MacOS and Ubuntu.

had the same issue with 2.2.0 thx for the info that i am not the only one it happens too, was already thinking its a windows dependent issue again

Sorry, left out OS info
Windows 11, git bash terminal. Maybe it is windows specific?

Sorry, left out OS info Windows 11, git bash terminal. Maybe it is windows specific?

I'm on windows 10 and got the same error as you but my coworker that is on a Mac has no issues.

Could be a windows issue. npm i spectaql worked in an ubuntu vm.

When I try to run the command directly "tar --strip-components 1 -C E:\workspace\Playground\SpectaQL\node_modules\spectaql\vendor\grunt-compile-handlebars -xvf E:\workspace\Playground\SpectaQL\node_modules\spectaql\vendor\grunt-compile-handlebars-1.0.0.tgz"
On windows it's unable to find the file (when in git-bash), PowerShell was unable to find the file (presumably because install reverted?).

I'm wondering if there is another check on terminal type? Like bash or powershell etc? I'm looking into code base today to see about proposing a PR to help with this

Hi there, everyone...this is definitely a platform-specific issue, but also probably something that should be eliminated from the installation process. Stay tuned for a fix.

@connorpwilliams @neffler @quasarchimaere

@newhouse sorry that i wasnt more specific, yes it is indeed a platform issue, both ubuntu builds and our docker image based gitlab ci work, idk if it is in anyway helpful but with our setup (win10 and weird grouppolicies due to our corporate setup it does not work with user privileges but running a commandshell (cmd gitbash, powershell alike) under localadmin privileges it works just fine

The problem really is that I published it wrong using yarn instead of npm, which left a bunch of stuff in the tarball package that should not have made it in there. That "stuff" causes the install process to go down a certain path that it should not go down, and that path won't work.

@quasarchimaere @connorpwilliams @neffler

Can anyone here try 2.2.1-beta.0 and let me know if that works and everything is ok?

Published it as 2.2.1.

Can someone confirm it works for them, please?

2.2.1 installed successfully. Love the turnaround time on this. Thank you!

$ npm i --save spectaql@latest

added 1 package, changed 1 package, and audited 343 packages in 1s

41 packages are looking for funding
  run `npm fund` for details

found 0 vulnerabilities

And with new project (another test)

$ npm i --save spectaql@latest
npm WARN deprecated opn@6.0.0: The package has been renamed to `open`

added 342 packages, and audited 343 packages in 2s

41 packages are looking for funding
  run `npm fund` for details

found 0 vulnerabilities

Great! Sorry for the problem!

@newhouse, also works for us here, thx a lot, that was really quick kudos