Error installing npm package 'kurento-client' (BufferUtil ~ node-gyp rebuild) - javascript

I'm trying to install a package 'Kurento-client' via npm but it gives error in installing its own dependencies (bufferutil and utf-8-validate). Error also mentions 'node-gyp rebuild'
Here is the screenshot of the error:
Can you please tell, what should I do or change?
When I install those 2 dependencies separately (bufferuil and utf-8-validate), they install successfully with the latest version.
But the Kurento-client is installing their old version. I don't know why. I need only kurento-client to be installed.

After searching for a while, I solved it by dropping the npm version. The reason is that some packages have dependencies which they need to install, and in our case, those dependencies were of the old version which cannot correlate with the newer version of npm. Either you have to update those ones separately or drop your npm version. Hope it helps someone!

Related

how i install the previous version react-native-pdf

i using react-native-pdf but in new version it use react-native-blob-util and when i install react-native-blob-util its crash.
i read from stackoverflow and google, that it's better to downgrade the react-native-pdf because, the downgrade version of react-native-pdf why don't use react-native-blob-util.
now i have react-native-pdf version = 6.4.0
now i want to downgrade to react-native-pdf
version = 6.2.0
please someone help me, thankyouu
You can install any npm module by mentioning the version as well. Remove the package from package.json first, then
npm i react-native-pdf#6.2.0
I had faced the same issue last week, so I started using react-native-view-pdf package, its similar and not much code change is required, you can try it.
You can just edit your package.json. Just edit your "react-native-pdf": "6.4.0" to "react-native-pdf": "6.2.0". And after that run npm install or yarn

How does yarn work when it encounters ^ (caret)?

How does yarn work when it encounter a ^ (caret) in package.json dependencies?
Let's say I have react: ^16.0.0 and when I yarn install, it will create a lock on that version (16.0.0).
Now sometime later when react 16.1.0 is released, and I yarn install again with the lock file, will yarn upgrade it to that version or follow what is in the lock file which is 16.0.0?
Thanks.
yarn install will install the exact version in the lockfile. That's the great benefit of a lockfile, everyone working on your project gets the exact same version of the package regardless of when the do yarn install. (e.g. I do yarn install today, when 16.0.0 is the current version, but you do yarn install tomorrow when 16.1.0 is the current version. We'll still both get 16.0.0 because that's what our lockfile says we should get. Our development environments are exactly the same, which is what we want. Likewise if we deploy in 2 weeks when 16.2.0 is the current version, 16.0.0 will get deployed; thus our dev and prod environments are exactly the same, too)
If 16.1.0 is released and you want to update your project to use it, use yarn upgrade. Note that you can upgrade all of your packages, or just one specific package, as well as update to the latest version of a package or a specific version of a package. https://yarnpkg.com/lang/en/docs/cli/upgrade/
Version Control Your package.json and yarn.lock
By adding these two files to version control, you'll easily be able to revert your project to a specific point in time in regards to your packages.
The selected answer is wrong.
caret means following
^3.1.4 will allow a version range from >=3.1.4 <4.0.0

Warning with installing fetch to node js

When i'm installing node-fetch
Here's a link
I'm getting that warning
`-- node-fetch#1.6.3
npm WARN motivation_bot#1.0.0 No repository field.
How to resolve the problem?
npm often gives warning while installing packages. In 99%, these are mistakes made by the creator of the package, in your cause motivation_bot. You can ignore them all if your package works like it should do. You will get warnings nearly every installation so don't care about it ^^.
Follow the instructions and install the package using the correct syntax (npm install node-fetch --save). After that, check your dependencies in the package.json file. If you find the package "node-fetch", you don't need to worry about the warning message.

Installing Gulp gives me these warnings

My Node version : v0.12.2
My npm version: 2.7.4
I ran the following command: npm install gulp -g
Should I care ? I get these warnings:
C:\Users\Maddy\Desktop\PublicServer\skill_tests>npm install gulp -g
npm WARN deprecated graceful-fs#3.0.8: graceful-fs v3.0.0 and before will fail on node releases >= v7.0. Please update to graceful-fs#^4.0.0 as soon as possible. Use 'npm ls graceful-fs' to find it in the tree.
npm WARN deprecated minimatch#2.0.10: Please update to minimatch 3.0.2 or higher to avoid a RegExp DoS issue
npm WARN deprecated minimatch#0.2.14: Please update to minimatch 3.0.2 or higher to avoid a RegExp DoS issue
npm WARN deprecated lodash#1.0.2: lodash#<3.0.0 is no longer maintained. Upgrade to lodash#^4.0.0.
npm WARN deprecated graceful-fs#1.2.3: graceful-fs v3.0.0 and before will fail on node releases >= v7.0. Please update to graceful-fs#^4.0.0 as soon as possible. Use 'npm ls graceful-fs' to find it in the tree.
Those error warnings are not a major issue. I get the same warnings when I install gulp. I have been using it for a while. It has to do with the libraries that support gulp. Gulp has dependencies and those dependencies are "packaged" together to create gulp. For example lodash is a javascript library that has a lot of array utilities. But lodash is maintained by the person who developed it
If you look in the node_modules folder you can see all the dependencies that make up gulp. I just pointed out lodash because you can find the link here and review it yourself. Gulp is not one javascript library it's a compilation of several projects that make up one tool.
Since npm has no kind of a rating system -- or anything remotely similar, there are a lot of "old" packages out there that refer to other "old" packages.
And, for the most part, that is fine.
For the most part being the key phrase.
Once in a rare while there may be a breaking change to node which causes one of these old packages to fail and you can get a cascading error upwards. However, it doesn't seem to happen too often -- I've only run into it once.
The bottom line is: Unless you are able to maintain the packages, there isn't really anything you can do about it.
All of these are warnings, which means you should be fine. If you encounter an error run:
npm list
which will give you a list of dependencies and packages. Generally speaking, these have to be updated by the author. So you if it's mission critical give them a ping on their repos or find alternatives that are maintained.

How to fix npm peer dependency issue?

I have a package.json that has the following modules that are conflicting:
react-router which needs react 0.13.x
redbox-react which needs react#>=0.13.2 || ^0.14.0-rc1
I just did an npm install react and it installed react#0.14
I am trying to install react-bootstrap which needs react#>=0.14.0.
I have been a few solutions:
delete node_modules from all the node_modules of dependencies every time I update
delete and reinstall all modules every time you face an issue
upgrade to npm 3.x which is still pre-release and
What is a good way of fixing these issues without having to do 1 or 2 which is npm version agnostic.
P.S.: All the modules referred to here have been installed locally.
Ensure you have the latest version of react-router (currently 1.0.0-rc3).
The react module is only listed as a dev dependency, and the requested version is 0.14.0 so there shouldn't be any issues.

Categories

Resources