I have just made some pulls from my library's from GitHub, I was using my windows computer to do the coding in VSCode. The code has no problem, although when I attempt to run npm install or yarn install to get the node_modules and the yarn.lock I get a weird error and the packages don't work. I'm using ZSH as the terminal for my Mac.
This is the error output:
niltonsf@Niltons-MacBook-Pro ignews.nosync % sudo yarn install
Password:
yarn install v1.22.15
[1/4] π Resolving packages...
[2/4] π Fetching packages...
error An unexpected error occurred: "https://registry.yarnpkg.com/acorn/-/acorn-7.4.1.tgz: incorrect data check".
info If you think this is a bug, please open a bug report with the information provided in "/Users/niltonsf/Desktop/ignews.nosync/yarn-error.log".
info Visit https://yarnpkg.com/en/docs/cli/install for documentation about this command.
error https://registry.yarnpkg.com/@next/swc-linux-x64-gnu/-/swc-linux-x64-gnu-11.1.2.tgz: incorrect data check
error https://registry.yarnpkg.com/@next/swc-win32-x64-msvc/-/swc-win32-x64-msvc-11.1.2.tgz: incorrect data check
niltonsf@Niltons-MacBook-Pro ignews.nosync % npm install
npm WARN deprecated @types/[email protected]: This is a stub types definition. next-auth provides its own type definitions, so you do not need this installed.
npm WARN deprecated [email protected]: The querystring API is considered Legacy. new code should use the URLSearchParams API instead.
npm WARN deprecated [email protected]: The querystring API is considered Legacy. new code should use the URLSearchParams API instead.
npm ERR! code Z_DATA_ERROR
npm ERR! errno -3
npm ERR! zlib: incorrect data check
npm ERR! A complete log of this run can be found in:
npm ERR! /Users/niltonsf/.npm/_logs/2021-10-05T15_44_51_340Z-debug.log
niltonsf@Niltons-MacBook-Pro ignews.nosync %
My versions from node, npm and yarn:
node: v14.18.0
npm: 6.14.15
yarn: 1.22.15
macos: Big Sur
What I have attempted:
deleting the yarn.lock
running: npm cache verify and then npm cache clean --force
This is the end of the log result:
1165 verbose stack at PassThrough.Writable.write (internal/streams/writable.js:303:10)
1165 verbose stack at PassThrough.ondata (internal/streams/readable.js:731:22)
1165 verbose stack at PassThrough.emit (events.js:400:28)
1166 verbose cwd /Users/niltonsf/Desktop/github.nosync/ignews
1167 verbose Darwin 20.6.0
1168 verbose argv "/usr/local/Cellar/node@14/14.18.0/bin/node" "/usr/local/opt/node@14/bin/npm" "install"
1169 verbose node v14.18.0
1170 verbose npm v6.14.15
1171 error code Z_DATA_ERROR
1172 error errno -3
1173 error zlib: incorrect data check
1174 verbose exit [ -3, true ]
If I run the npm i or yarn in my windows computer I dont get any error
Z_DATA_ERROR
means that either the compressed data is corrupted, or it is not the expected compressed data at all. β Admonition