Search code examples
websocketnext.jsyarnpkg

How to solve "Integrity check failed for 'websocket-driver'" error when installing dependencies?


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

enter image description here

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

enter image description here

How to resolve the error?


Solution

  • 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.