I’m facing an issue where the build process fails in AWS Amplify during the yarn install step. Here are the details:
Build Logs Output:
2024-12-17T13:07:25.673Z [WARNING]: error An unexpected error occurred:
"https://registry.yarnpkg.com/cssesc/-/cssesc-3.0.0.tgz: Request failed "304 Not Modified"".
2024-12-17T13:07:25.677Z [INFO]: info If you think this is a bug, please open a bug report
with the information provided in "yarn-error.log".
Environment Details:
- AWS Amplify Hosting
- Package manager command used: yarn install –frozen-lockfile
- Clearing Yarn Cache: Added the –no-cache flag in the amplify.yml file:
yarn install --frozen-lockfile --no-cache
- Clear Yarn Cache in Amplify Build:
version: 1
frontend:
phases:
preBuild:
commands:
- yarn cache clean
- yarn install --frozen-lockfile
build:
commands:
- yarn run build
artifacts:
baseDirectory: .next
files:
- '**/*'
cache:
paths:
- .next/cache/**/*
- node_modules/**/*
2
Answers
The issue with "304 Not Modified" responses during package installation has been identified as a problem specific to the Mumbai, India region. It was caused by issues with the npm registry servers.
For further updates, check the official npm incident status page.
Right now im facing the same issue for which i cant able to find any solution. Actually this issue happened suddenly today without any major changes.