Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

gramma server install fails #47

Open
gtournie opened this issue May 29, 2023 · 1 comment
Open

gramma server install fails #47

gtournie opened this issue May 29, 2023 · 1 comment
Assignees
Labels
bug Something isn't working

Comments

@gtournie
Copy link

Describe the bug
command 'npx gramma server install' fails:

res.body.pipe(str).pipe(fileStream)
             ^
TypeError: res.body.pipe is not a function

To Reproduce
install gramma with node 18.16.0 & npm 9.5.1

Expected behavior
It should download the file

Screenshots
Capture d’écran 2023-05-29 à 23 33 27

Desktop (please complete the following information):

  • OS: macOS
  • node 18.16.0

Additional context
Seems to work if I replace this slice of code in downloadFile.js (L30):

return new Promise((resolve, reject) => {
  res.body.pipe(str).pipe(fileStream)
  res.body.on("error", (err) => {
    reject(err)
  })
 fileStream.on("finish", () => {
   bar.stop()
   resolve()
 })
})

by

await pipeline(res.body, str, fileStream)
bar.stop()

with const { pipeline } = require('node:stream/promises');

@gtournie gtournie added the bug Something isn't working label May 29, 2023
@skogsbaer
Copy link

Any progress here? The bug also hurts me

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

3 participants