Solo quería crear un nuevo proyecto NextJS usando yarn create next-app <project-name> , pero en el paso de "instalación de dependencias", yarn falla con el siguiente mensaje de error:
error https://registry.yarnpkg.com/@next/swc-linux-arm-gnueabihf/-/swc-linux-arm-gnueabihf-12.0.4.tgz: incorrect data check [same error with different packages] error https://registry.yarnpkg.com/next/-/next-12.0.4.tgz: Extracting tar content of undefined failed, the file appears to be corrupt: "Invalid tar header. Maybe the tar is corrupted or it needs to be gunzipped?" info Visit https://yarnpkg.com/en/docs/cli/add for documentation about this command. error https://registry.yarnpkg.com/@next/swc-linux-arm64-gnu/-/swc-linux-arm64-gnu-
También recibo este error cuando normalmente trato de instalar paquetes npm con hilo. Aparentemente, esto parece ser un error al extraer algunos archivos tar, pero no estoy seguro de la causa exacta del error y cómo solucionarlo. Desafortunadamente, reinstalar yarn no solucionó el error. ¿Cómo puedo arreglar esto?
Editar: usar npm no funciona tan bien y aparece el siguiente error:
npm WARN tar zlib: incorrect data check npm WARN tarball tarball data for @next/swc-darwin-x64@https://registry.npmjs.org/@next/swc-darwin-x64/-/swc-darwin-x64-12.0.4.tgz (sha512-PVgefMWjxP6CU1HQs39+Bfpjcue6qErJfvJ/+n2zimjLzyeQAmD6LM9f1lDSttW2LjKjasoxR5qkRNLVlqzlaA==) seems to be corrupted. Trying again. npm ERR! code Z_DATA_ERROR npm ERR! errno -3 npm ERR! zlib: incorrect data check