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
[Bug?]: node17 compat: │ Error [ERR_STREAM_PREMATURE_CLOSE]: Premature close #3597
Comments
Thanks for posting this issue, helped me figure out why I suddenly started seeing
Which I guess suddenly starting pulling the Node v17 image today. I should have written:
(or something like this) |
@patdx & @aladdin-add , I'm currently facing the same problem. Should I downgrade my Node.js to LTS 🔧 Self-Service
📜 Describe the bugError logs are as follows:
🎯 To reproduceyarn add -D vuepress-theme-vdoing 🖥️ Environment
❓ Aditional Context
|
I invoked
|
|
@aladdin-add , Thank you! ❤️
|
This avoids the following Yarn / Node 17 regression: [Bug?]: node17 compat: │ Error [ERR_STREAM_PREMATURE_CLOSE]: Premature close #3597 <yarnpkg/berry#3597> (This has already been fixed in newer Yarn, but we want to stick to the LTS anyway.)
* ci(circleci): fix Node versions to 16 (LTS), rather than 17 This avoids the following Yarn / Node 17 regression: [Bug?]: node17 compat: │ Error [ERR_STREAM_PREMATURE_CLOSE]: Premature close #3597 <yarnpkg/berry#3597> (This has already been fixed in newer Yarn, but we want to stick to the LTS anyway.) * ci(circleci): update circleci/node orb, and use new yarn-berry support Also drop link to <CircleCI-Public/node-orb#63>: the issue has been resolved, but there still isn't a partial restore key without the branch name when include-branch-in-cache-key is enabled.
@aladdin-add M V P ❤️ on a side-note, also my hero back in ole '96 yarn set version from sources also works (v3.2.0-rc.3) and gets me past and fixes CI failing to upgrade to v3.1.0 |
Resolve both issues from OP and comment yarnpkg/berry#3597 (comment) yarn-berry.cjs name looks deprecated, favouring explicit semver Prefer this too, since current ver 3.0.2 was hard to dig-up from yarn-berry.cjs
Follow-up on yarnpkg/berry#3597 (comment) / 6b81235 No yarn.lock change noted this on from follow-up yarn install yarn set version berry - added to package.json: "packageManager": "yarn@3.1.0" CLI forgetting to cleanup, manually revert, appears to have no effect Raise issue if not already, consider PR contrib Note .yarn/releases/yarn-<name>.cjs switching between named <-> explicit 🔄 - berry -> 3.1.0 -> sources
Following command solved the issue in my environment:
|
I had this issue trying to @bmaier 's |
Updating yarn to latest leads me to a new error:
Any clue on how I can go about fixing it? |
I'm getting the same issue. Feels like I'm going in circles 😅 . |
You need to update the plugins you're using as well |
Is there any sort of comprehensive document on how to upgrade from |
See also: https://yarnpkg.com/getting-started/migration Squashed: yarn set version berry (3.0 -> 3.1+) to fix ERR_STREAM_PREMATURE_CLOSE In our case this bumped to 3.2.3 See also: yarnpkg/berry#3597
See also: https://yarnpkg.com/getting-started/migration Squashed: yarn set version berry (3.0 -> 3.1+) to fix ERR_STREAM_PREMATURE_CLOSE In our case this bumped to 3.2.3 See also: yarnpkg/berry#3597
See also: https://yarnpkg.com/getting-started/migration Squashed: yarn set version berry (3.0 -> 3.1+) to fix ERR_STREAM_PREMATURE_CLOSE In our case this bumped to 3.2.3 See also: yarnpkg/berry#3597
This fixes an issue I had locally when running `yarn`: ``` ➤ YN0001: │ Error [ERR_STREAM_PREMATURE_CLOSE]: Premature close at new NodeError (node:internal/errors:387:5) at PassThrough.onclose (node:internal/streams/end-of-stream:142:30) at PassThrough.emit (node:events:513:28) at emitCloseNT (node:internal/streams/destroy:132:10) at process.processTicksAndRejections (node:internal/process/task_queues:81:21) ➤ YN0000: └ Completed in 0s 686ms ➤ YN0000: Failed with errors in 0s 820ms ``` More info at: yarnpkg/berry#3597 (comment)
This fixes an issue I had locally when running `yarn`: ``` ➤ YN0001: │ Error [ERR_STREAM_PREMATURE_CLOSE]: Premature close at new NodeError (node:internal/errors:387:5) at PassThrough.onclose (node:internal/streams/end-of-stream:142:30) at PassThrough.emit (node:events:513:28) at emitCloseNT (node:internal/streams/destroy:132:10) at process.processTicksAndRejections (node:internal/process/task_queues:81:21) ➤ YN0000: └ Completed in 0s 686ms ➤ YN0000: Failed with errors in 0s 820ms ``` More info at: yarnpkg/berry#3597 (comment)
since this issue describes the problem i had pretty well, but i didn't find my solution here, i think i'll share what made it work in my case (trying to get govuk-react running on my computer): after running so, i ended up deleting the plugins:
- - path: .yarn/plugins/@yarnpkg/plugin-version.cjs
- spec: "@yarnpkg/plugin-version"
- - path: .yarn/plugins/@yarnpkg/plugin-workspace-tools.cjs
- spec: "@yarnpkg/plugin-workspace-tools"
- - path: .yarn/plugins/@yarnpkg/plugin-typescript.cjs
- spec: "@yarnpkg/plugin-typescript" i then ran these commands to reinstall the plugins:
since i'm not used to yarn, i don't know how usually to go about this issue, but the described worked for me. no more errors when running |
See also: https://yarnpkg.com/getting-started/migration Squashed: yarn set version berry (3.0 -> 3.1+) to fix ERR_STREAM_PREMATURE_CLOSE In our case this bumped to 3.2.3 See also: yarnpkg/berry#3597
The issue that this fixes is that on NodeJS v18.x LTS Yarn started crashing with the following error on the CI while trying to install the dependencies for the project: YN0001: │ Error [ERR_STREAM_PREMATURE_CLOSE]: Premature close at new NodeError (node:internal/errors:393:5) at PassThrough.onclose (node:internal/streams/end-of-stream:142:30) at PassThrough.emit (node:events:513:28) at emitCloseNT (node:internal/streams/destroy:132:10) at process.processTicksAndRejections (node:internal/process/task_queues:81:21) The fix was done based on the suggestion here: yarnpkg/berry#3597 (comment) Signed-off-by: Peter Somogyvari <peter.metz@unarin.com>
For folks showing up here from Google... in modern times |
See also: https://yarnpkg.com/getting-started/migration Squashed: yarn set version berry (3.0 -> 3.1+) to fix ERR_STREAM_PREMATURE_CLOSE In our case this bumped to 3.2.3 See also: yarnpkg/berry#3597
See also: https://yarnpkg.com/getting-started/migration Squashed: yarn set version berry (3.0 -> 3.1+) to fix ERR_STREAM_PREMATURE_CLOSE In our case this bumped to 3.2.3 See also: yarnpkg/berry#3597
See also: https://yarnpkg.com/getting-started/migration Squashed: yarn set version berry (3.0 -> 3.1+) to fix ERR_STREAM_PREMATURE_CLOSE In our case this bumped to 3.2.3 See also: yarnpkg/berry#3597
yarn set version 4.0.2 See also: - https://yarnpkg.com/getting-started/migration - https://yarnpkg.com/blog/release/4.0#installing-yarn Squashed: yarn set version berry (3.0 -> 3.1+) to fix ERR_STREAM_PREMATURE_CLOSE In our case this bumped to 3.2.3 See also: yarnpkg/berry#3597
yarn set version 4.0.2 See also: - https://yarnpkg.com/getting-started/migration - https://yarnpkg.com/blog/release/4.0#installing-yarn Squashed: yarn set version berry (3.0 -> 3.1+) to fix ERR_STREAM_PREMATURE_CLOSE In our case this bumped to 3.2.3 See also: yarnpkg/berry#3597
yarn set version 4.0.2 See also: - https://yarnpkg.com/getting-started/migration - https://yarnpkg.com/blog/release/4.0#installing-yarn Squashed: yarn set version berry (3.0 -> 3.1+) to fix ERR_STREAM_PREMATURE_CLOSE In our case this bumped to 3.2.3 See also: yarnpkg/berry#3597
yarn set version 4.0.2 See also: - https://yarnpkg.com/getting-started/migration - https://yarnpkg.com/blog/release/4.0#installing-yarn Squashed: yarn set version berry (3.0 -> 3.1+) to fix ERR_STREAM_PREMATURE_CLOSE In our case this bumped to 3.2.3 See also: yarnpkg/berry#3597
yarn set version 4.0.2 See also: - https://yarnpkg.com/getting-started/migration - https://yarnpkg.com/blog/release/4.0#installing-yarn Squashed: yarn set version berry (3.0 -> 3.1+) to fix ERR_STREAM_PREMATURE_CLOSE In our case this bumped to 3.2.3 See also: yarnpkg/berry#3597
Setting That is, either doing (from https://stackoverflow.com/a/71276936/441757, via substrate-developer-hub/substrate-front-end-template#213 (comment)) |
Self-service
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
Additional context
No response
The text was updated successfully, but these errors were encountered: