-
-
Notifications
You must be signed in to change notification settings - Fork 1.4k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
NPM pulls corrupted packages from Verdaccio instance #756
Comments
You would need to provide more info. |
Hi, thank you for the quick feedback: NPM Version: Latest - 6.1.0 but it happens with older versions. Environment: Windows Server 2012 (SP2) The server that Verdaccio is not behind a proxy. |
Hello @ckkoeber, I don't think verdaccio stored corrupted packages on its file system, In my case it happened because npm was trying to check the package integrity with a wrong hash. |
@lgaitan Thank you for the helpful hint. Forgive me if this is common knowledge: where would I find the |
Yes, it should be located on the project folder that you are trying to install. it can be either |
OK, so after performing the following everything worked:
Thank you everyone for the feedback. |
Adding *nix variant:
|
definitively a package-lock.json is involved in this problem. "rm package-lock.json" should never be done unless you don't care what you will distribute. When you will make "npm install" a new package-lock.json will be create and the next "npm cache clear -force & npm install --force --verbose --no-bin-links" will give you the error "seems to be corrupted" again. This bug seem to be only when you use npm (recent version) on windows. verdaccio can run on any type of machine (I try window and mac). It seem that we don't receive the complete tar file. If we do "npm install" without clearing the npm cache many time, it work (it mean sometime the tar file is well transfered, sometime not). Also I see that the error is more often when we transfer big tar file, (in may case over 100meg) note also that I see this error with sinopia 1.4 then it maybe a old bug (or a new one in npm). I have a felling that if the network is slow, we don't have this error ... but for now it just a felling. Hope it help |
after performing the following everything still not worked:
npm version 6.7.0 |
Was able to solve the problem by turning off Verdaccio's 'cache'
Correction: changed the npmrc setting in the project itself to |
If you turn of the cache, tarballs are not persisted affecting the registry performance. It is ok to do it but be aware of it. |
I tried @ckkoeber solution and @2imagine solution both options did not resolve the corrupted package issue for me.
PS > node --version using docker version verdaccio/verdaccio@latest |
🤖This thread has been automatically locked 🔒 since there has not been any recent activity after it was closed. |
Describe the bug
When I perform a basic
npm install
in an application I am attempting to set up a dev. environment for corrupted packages end up being pulled from my Verdaccio proxy instance.To Reproduce
Steps to reproduce the behavior:
npm set registry [[Verdaccio Server URL]]:4873
npm install
within the directory I have the package.json in.Results
I get a ton of output similar to the following:
Note the URL encoded name of the package, in this case
@angular%2fplatform-browser-dynamic
. I do not get this when I set my proxy to behttps://registry.npmjs.org/
Expected behavior
I am able to perform an
npm install
just as if I were connected to the official registry.Screenshots
N/A
Configuration and Log Files
verdaccio-log.txt
npm-verbose-log.txt
config.yaml.txt
The text was updated successfully, but these errors were encountered: