I'm pulling an Angular 6 project from our repo to my new laptop. My npm version is 6.9.0. My node version is 12.4.0. The project is an Angular 6.0.7 project. Globally I have Angular 6.0.8 installed, and locally (in my project), I have Angular CLI 6.0.8 but below that where it lists the Angular version, it says Angular: <error>.
ng serve fails with the error Could not find module "@angular-devkit/build-angular" from "my-project-path". Thus I tried to install this via npm install --save-dev @angular-devkit/build-angular. However, this also failed with the error message:
npm ERR! code EINTEGRITY
npm ERR! sha512-spKHSBQIxxS81N/O21WmuXA2F6wppUCsutpzenOeZzOCCJ5gEfcbqJP983IrpLXzYmXnMUa6J03SubcNPdKrlg== integrity checksum failed when using sha512: wanted sha512-spKHSBQIxxS81N/O21WmuXA2F6wppUCsutpzenOeZzOCCJ5gEfcbqJP983IrpLXzYmXnMUa6J03SubcNPdKrlg== but got sha512-2lGfU4gymmhXRUiPLeQlnlkMaSY8azJB9W8e/vFp44AlAOEvzf6XiBUoTHO9NBM4OVlehybxDM9B4SwLBh42mw==. (10271 bytes)
...
npm ERR! code EPROTO
npm ERR! errno EPROTO
npm ERR! request to https://registry.npmjs.org/app-root-path failed, reason: write EPROTO 11628:error:1408F10B:SSL routines:ssl3_get_record:wrong version number:c:\ws\deps\openssl\openssl\ssl\record\ssl3_record.c:332:
npm ERR!
I checked package-lock.json within my project, and in the file-saver object, the integrity key has sha512-spKHSBQIxxS81N/O21WmuXA2F6wppUCsutpzenOeZzOCCJ5gEfcbqJP983IrpLXzYmXnMUa6J03SubcNPdKrlg== which is referenced in the error message as what npm wanted. I don't know why it got the other integrity value.
Any suggestions on how to resolve this EINTEGRITY error?