javascriptnpmyarnpkgyarnpkg-v2package-management

Yarn install fails with 'Request failed "304 Not Modified"' error for buffer-alloc-unsafe package


I'm encountering an error while trying to install packages using Yarn. When running yarn install, the process fails with the following error:

error Error: https://registry.yarnpkg.com/buffer-alloc-unsafe/-/buffer-alloc-unsafe-1.1.0.tgz: Request failed "304 Not Modified"

Environment:

Full error output:

[2/4] 🚚  Fetching packages...
error Error: https://registry.yarnpkg.com/buffer-alloc-unsafe/-/buffer-alloc-unsafe-1.1.0.tgz: Request failed "304 Not Modified"
    at ResponseError.ExtendableBuiltin (/opt/homebrew/Cellar/yarn/1.22.22/libexec/lib/cli.js:696:66)
    at new ResponseError (/opt/homebrew/Cellar/yarn/1.22.22/libexec/lib/cli.js:802:124)
    at Request.<anonymous> (/opt/homebrew/Cellar/yarn/1.22.22/libexec/lib/cli.js:66750:16)
    at Request.emit (node:events:513:28)
    at module.exports.Request.onRequestResponse (/opt/homebrew/Cellar/yarn/1.22.22/libexec/lib/cli.js:142287:10)
    at ClientRequest.emit (node:events:513:28)
    at HTTPParser.parserOnIncomingClient (node:_http_client:710:27)
    at HTTPParser.parserOnHeadersComplete (node:_http_common:117:17)
    at TLSSocket.socketOnData (node:_http_client:552:22)
    at TLSSocket.emit (node:events:513:28)
info Visit https://yarnpkg.com/en/docs/cli/install for documentation about this command.

What I've tried:

How can I resolve this installation error and successfully install my dependencies?


Solution

  • Issue resolved now Seems to be a recent issue seen around India (Mumbai) region