Yum package dependency error not allowing package install - repository

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,

Related

Error in emotion/styled package, cannot find answer ANYWHERE

I keep getting the following error, I'm using meteor 2.1 currently
Error: A new entrypoint in the #emotion/styled package, #emotion/styled/base, has replaced the #emotion/styled-base package. Please remove this package and use #emotion/styled/base instead.
i cannot find ANY way to install this #emotion/styled/base package. #emotion/styled-base is installed and i cannot create a build suddenly.
any suggestions???
I'm using react.js
#emotion/styled/base isn't a package you need to install, but rather its a submodule of the #emotion/styled package.
I have a hunch that you are not using #emotion/styled-base directly, so most likely what you have is a version mismatch where you have a newer version of #emotion/styled installed, but that package is written for an older version. You'll probably just need to locate this offending package and update it.
If this isn't the case, then you'll just need to replace your imports for #emotion/styled-base with ones for #emotion/styled/base

Upgrading NPM from 5.8 to latest

I want to look at upgrading NPM on a project I'm working on from 5.8.0 to the latest version.
Is this something that is safe to do without breaking any packages i have installed? And if there's a chance it might, what is the best method for testing those packages to make sure everything is running correctly still?
Updating NPM is unlikely to break anything. However your packages may require a certain version of Node.js to function properly.
There also isn't really a "best method" to check if everything runs correctly. Ill refer you to this answer which has a few options you can try.

If I need to manually custom code from npm module, how should I do it

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.

Install NPM modules on current project while offline

this question might seem stupid but I'm looking for a solution to this scenario:
Let's say I'm starting a new project at an offline environment and I have some npm packages installed globally on my laptop and I'd like to use them for a new project I just created.
For example: I've used npm i -g create-react-app and now I'd like to use create-react-app to make a new react app but I'm currently offline.
I've tried to follow an "offline npm" solution where I basically create an npm server on my computer but I didn't manage to make it work, and am not sure if this will give me the solution I'm looking for.
Sorry if this was answered before, I couldn't find a solution.
Thanks in advance!
You can try run
create-react-app youproject
when you are offline. For me, this sometimes work, sometimes not.
Other solution is install offline all packages, defined in package.json file. You can do this, if you have this packages installed in online mode.
So you can try install this packages, using:
npm link packagename
or
npm i './path_to_package_in_user_directory' // yes, you can also install packages from folder
This solution is also ok, when you try add new packages to existing project. Sometimes this causes error and you need reinstall all packages (that's big pain), but most of all, works good.

How to make npm use the lowest version that matches all requirements

We're using NodeJS for some projects and are faced with an issue that must have a simple solution (seeing as nobody else seems to have the problem).
In the packages.json there are a bunch of dependencies mentioned with a minimum version, each of which may have overlapping dependencies of their own. The default way a dependency is added is using the ^ operator which seems to mean 'compatible with' or 'same major version, but minor versions may differ'.
The way I understand npm to work is on npm install to take the highest minor version available that matches. Unfortunately 'compatible with' is not quite as enforced as you'd hope.
The situation this puts us in is that for instance on a developer machine version 1.1.0 is installed, but between development and publishing a new version 1.2.0, that has a bug, is introduced. On our build machine a fresh build is made which ends up using 1.2.0 and we've introduced a bug that wasn't there in development.
We tried changing the ^ operator to = for instance, but this gives us trouble when dependencies have subdependencies that aren't compatible with the requested version.
All in all I'm a bit confused, but this thing keeps biting us anytime something changes since the development machines don't do anything on npm install if the package is already there, but the build machine always gets fresh copies.
I know from NuGet that it always takes the lowest version that matches all combined requirements. Since this is always the same for a given set of dependencies, I much prefer this approach. Is there a way to make npm work like this too?
To answer my own question:
npm has introduced a new command npm ci which does something similar to npm install but enforces that the specific versions are used that were also used when a package was initially added by using the package-lock file.
See https://docs.npmjs.com/cli/ci for more information