Error Message: Zlib error (-3): incorect data check in Mac

Error Message: Zlib error (-3): incorect data check in Mac during making build , creation Of App,
npm install in all case getting the same error .can anyone tell me the reason why this happend and
also suggest me the solution

**npm ERR! code Z_DATA_ERROR**
**npm ERR! errno -3**
**npm ERR! zlib: incorrect data check**

Thankyou in Andvance :slight_smile:

It would be helpful if you could provide more information. What build command are you using? What are the details of your system config? (ionic info will print out a helpful list of major versions for you.)

2 Likes

information

=>ionic capacitor build ios --force /sudo ionic capacitor build ios --force
=>ionic capacitor add ios /sudo --force
=>npm install --force

Mac 11 verison bigSure
node : 16.20.0
npm :8.19.4
ionic :5.4.16

Error=>

error code Z_DATA_ERROR
29 error errno -3
30 error zlib: incorrect data check
31 verbose exit [ -3, true ]
------------------------------------------[quote=“ptmkenny, post:2, topic:240391, full:true”]
It would be helpful if you could provide more information. What build command are you using? What are the details of your system config? (ionic info will print out a helpful list of major versions for you.)
[/quote]

You should not need sudo or --force for any Ionic or npm commands.

Try using the commands without sudo and --force, and if you get errors, try to fix those errors.

Use of sudo in particular can cause hard-to-debug permissions issues. npm should run fine without ever needing to use sudo.

I already Try this using without sudo but still getting same error

Delete the node module directory and reinstall it, by running command
rm-rf node_module
npm install

whenever i tries to install node_module face this Zlip (-3)incorrect data check in VM MAC on Bigsure
node version 16 facing again & again this issue
:neutral_face: :pensive: