After pnpm install, it reports an error
king-open opened this issue · comments
King commented
Describe the bug
ERR_STREAM_PREMATURE_CLOSE Premature close
Error [ERR_STREAM_PREMATURE_CLOSE]: Premature close
at new NodeError (internal/errors.js:322:7)
at IncomingMessage.onclose (internal/streams/end-of-stream.js:117:38)
at IncomingMessage.emit (events.js:400:28)
at TLSSocket.socketCloseListener (_http_client.js:432:11)
at TLSSocket.emit (events.js:412:35)
at net.js:686:12
at TCP.done (_tls_wrap.js:564:7)
Reproduction
null
System Info
MacOS
Chrome
`pnpm install`
Used Package Manager
pnpm
Validations
- Follow our Code of Conduct
- Read the Contributing Guide.
- Check that there isn't already an issue that reports the same bug to avoid creating a duplicate.
- Check that this is a concrete bug. For Q&A, please open a GitHub Discussion instead.
- The provided reproduction is a minimal reproducible of the bug.
Tmk commented
try to replace npm registry with https://npmmirror.com/
King commented
I'll try
King commented
But using npm install is so slow
King commented
Solved, thanks
Tmk commented
You can add this to your project .npmrc
file, npm/pnpm will use it for this project:
registry = https://registry.npmmirror.com
King commented
My default mirror is this one