So, I have verdaccio hosted on my local machine. I have a few packages published on it as well with versions. What I want to do is, clear all of these packages with their versions. Like a reset to my verdaccio. I can unpublish the packages via npm unpublish command, but that would take me time since there are many versions. I am aware a similar question exists here Question, but it quite doesn't solve my problem.
To summarize, is there any way where I can remove all packages from my local verdaccio in one step (or maybe two steps) or any command? Basically a quicker way.
I found a way. Actually this was not what I was looking for, but it solves the problem. So, I can just delete the packages which I do not want from the verdaccio storage directory. This directory can be found here:
C:\Users\username\AppData\Roaming\verdaccio\storage
It has sub directories of all the published packages. Just delete the ones which are not needed. I was actually looking for a more npm and verdaccio command specific way, but this seems to work fine.
Related
The answer seems like 'no' but I wanted to check with colleagues here.
We provide an npm package for our own sites as well as some 3rd party sites.
There's a fairly heavy and old homegrown npm package that we also have in our package.
We don't need that package any longer on our sites but the 3rd party sites do.
We also have no way of controlling the code on those 3rd party sites so we need to keep the deployed bundle name and location the same for them.
Is there a way to publish a version of our package first without the extra package for us and then a version with it for the third parties from the same repository?
ourpackage-new.js (without the dependency)
ourpackage.js (with the dependency)
I had some success with a new package json in a subdirectory. I would create a new package and the original package via a command in gitlab.yaml to cd into that directory and npm publish there after the first one. This requires copying some dependency files down there as well which would mean if one version was updated, we'd need to remember to update the copy. Not a situation we'd want.
Even if we created a 2nd repository for the change just for us, we'd still need to update 2 repositories every time we had a new change to deploy.
Checked into Aliasing as well, we wouldn't be planning to import a new version and an old version though, more like sister versions.
In any case, thanks for the input and thoughts. I realize Npm was prob not made for this type of situation. If I remember right, I could do this with Gulp years ago, but I haven't even thought about Gulp in so long :) And then, I'd have to deploy manually via an FTP program ... wow, those were days.
Thanks again!
I'm trying to install rpm-build, but it seems there is some problems with dependencies:
The package that's installed is coming from a repo which is no longer available (linuxcoe_update_errata), I don't know what happened to it but the URL is no longer accessible, and the package that it wants to install is coming from another repo called core (this repo works just fine)
Seems like rpm-build need a lower version for rpm, which apparently should be not a problem. I tried dowgrading the version but is not working, again more conflicts, I tried to remove that package, but maybe because the repo that installed it is no longer available it does not uninstall anything.
How can I fix this? I need to install rpm-build in this machine, can't do it on another, but is not letting me. I think the problem has to be related to the repo which the package came from not being available anymore (linuxcoe_update_errata). I tried enabling notify_only=1 in /etc/yum/pluginconf.d/search-disabled-repos.conf so yum can try to resolve the error but itself, but still nothing. Any ideas? I'm really confused about this,
I am currently working with GitLab-CI and one problem that I have is that I need to use unique version names in my NPM registry. Now, while I really like this feature with NPM in the open world, in development when pipelines are run on development branches for features not released, this is somehow annoying since the registry gets filled up with trash pretty easily.
There are 2 ways I can think of to accomplish using the same version like 0.1.0-alpha again.
npm unpublish
is not available in the GitLab registry at the moment
use curl and GitLab api to delete repository first
This will probably the way I go if no one has a better solution, but I don't really like this approach as I don't want my pipeline and repositories being full with shell scripts that need maintaining.
Are there any more elegant solutions to this problem?
In the react-native world I came across using many lib packages, some of them are outdated or not maintained. By going through the issue ticket or google for some solution to some bug, sometime I found a solution but how should I apply it?
I normally just change the code inside node_module directly, but I know this is really bad way cause it not even my git and gonna be lost at some point
what is the proper way to do this?
You can install node modules that aren't in the registry.
See: https://docs.npmjs.com/cli/install
Specifically these two methods are worth a look.
npm install <git-host>:<git-user>/<repo-name>
npm install <git repo url>
If the module in question are hosted on github, clone the repository, apply the patch to it there, and then use the module directly from github.
You could also see if anyone else is maintaining a fork of it.
Working in one folder, how should one tell npm to install to a different location? Initially I was thinking you could include a tag with the location. Documenting this because when I made the search I didn't see any answers readily available (possibly because the answer is pretty simple).
I realized it is quite simple - just cd into the directory you're wanting to install in and run the install command like usual.