I tried to upload my Next.js application to Vercel and during the deployment time Vercel threw an error message.

Then I tried to reinstall my yarn package and the installation did not get completed my command terminal threw the same error about websocket.

How to resolve the error?
You can try clearing the cache and updating the checksums in the yarn.lock file by running the following commands.
yarn cache clean
yarn install --update-checksums
You could also try deleting the yarn.lock file altogether and re-run yarn install.
check if there's anything cached in ~/.config/yarn.
rm -rf ~/.config/yarn solved my problem.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With