question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

[Bug?]: node17 compat: │ Error [ERR_STREAM_PREMATURE_CLOSE]: Premature close

See original GitHub issue

Self-service

  • I’d be willing to implement a fix

Describe the bug

Fetch step ➤ YN0001: │ Error [ERR_STREAM_PREMATURE_CLOSE]: Premature close at new NodeError (node:internal/errors:371:5) at PassThrough.onclose (node:internal/streams/end-of-stream:122:30) at PassThrough.emit (node:events:390:28) at emitCloseNT (node:internal/streams/destroy:145:10) at processTicksAndRejections (node:internal/process/task_queues:82:21)

To reproduce

https://github.com/weiran-zsd/dts-cli/runs/3947685268

Environment

os: ubuntu-latest
Node.js: v17.0.0
yarn: v3.0.2

Additional context

No response

Issue Analytics

  • State:closed
  • Created 2 years ago
  • Reactions:23
  • Comments:13 (1 by maintainers)

github_iconTop GitHub Comments

59reactions
aladdin-addcommented, Nov 1, 2021
  1. it has been fixed in latest yarn, so please upgrade: yarn set version latest.
  2. As v17 is not a lts, please use node v16/v14 in production (node:latest => node:lts).
15reactions
Dragon1573commented, Nov 1, 2021

@aladdin-add , Thank you! ❤️

  1. I have invoked yarn set version berry and upgraded to v3.1.0, it DOES solved the problem! 🎉
  2. I’m new to Node.js and Yarn, just because I want to publish my notes to GitHub Pages using VuePress. There’re too many things that I didn’t know before. I’ll downgrade to the latest LTS version of Node.js as you instructed.
Read more comments on GitHub >

github_iconTop Results From Across the Web

npm ERR! premature close when using npm install
In my case, the package I was trying to install had a dependency on a Git repository that didn't have a package.json defined...
Read more >
I cant create react app - Reddit
2 can't be found in the cache and will be fetched from the remote registry ➤ YN0001: │ Error [ERR_STREAM_PREMATURE_CLOSE]: Premature close at ......
Read more >
Node v17.0.0 (Current)
If you hit an ERR_OSSL_EVP_UNSUPPORTED error in your application with Node.js 17, it's likely that your application or a module you're using ...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found