Warning with installing fetch to node js - javascript

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.

Related

NPM peer dependencies issue while building vis-timeline locally

I am using vis-timelime in one of my projects. I have done some changes in vis-timeline, then locally build it and using it as dependency in my project. While doing so, vis-timeline is getting installed properly but i believe the peer dependencies of vis-timeline are not coming. Do note that I'm using npm version - 7.6.3.
cd vis-timeline;
//added some console logs in few files
npm install;
npm run build;
Then in my project-
cd my-app
npm install local-path-to-my-vis-timeline
Running above commands install the vis-timeline in node_modules of my-app. However, other peer dependencies of vis-timeline like vis-data, etc. do not come automatically. Since I am using npm version 7.6.3, wasn't it supposed to happen automatically?? If not, any graceful solution to this?
Or let me know of any other better way to locally do changes in vis-timeline library and use it in my local project for debugging.
Sounds like an issue with npm. This post has a list of solutions that might work.
Otherwise, maybe try using yarn instead of npm?

Next.js: Module not found: Can't resolve 'canvg'

I have a next.js project and I keep getting:
error - ./node_modules/jspdf/dist/jspdf.es.min.js:458:25
Module not found: Can't resolve 'canvg'
I'm not sure why because I'm not including either jspdf or canvg.
Not sure what's causing it. Any help would be appreciated. I'm using material-ui if that matters.
It seems dependency error means that particular Module is missing when it's running.
Run npm ls or yarn list will print to stdout all the versions of packages that are installed, as well as their dependencies, in a tree-structure. Then search for that particulate packages are listed or not.
Run npm ls jspdf or yarn list jspdf then you can see its list of dependencies in tree-structure.
Please check your node version is updated or not ? If not then update first.
Quick & Dirty way: delete package.lock or yarn.lock file and delete .node_modules folders And Then run npm install or yarn to install again.
Look at console while you installing and make sure there are no error in the installing process. If you saw error you better look that massages also.

How to install Redux after creating a React application using create-react-app?

Created an application using create-react-app. I wrote just the word test in the render method to display on the screen. And everything is ok.
Then I write: npm install --save redux for the folder with the application and the application does not work.
In console error:
How then to install redux after create-react-app? What is the procedure step by step?
Or Maybe you know some article where they describe step by step? Or do you know some video on YouTube?
When you installed redux you might have mispelled it while installing because in your screenshot see the error carefully it is shown the redux spelling as 'redx' so try fixing it by installing correctly with npm or try with yarn.
To do with npm :-
npm i redux --save
And if you want to install any packages with yarn you can do so with following command :-
yarn add redux
The other thing I have seen in your image is that there is an error of #babel/runtime if the error is coming again after installing redux correctly then you might have to install it manually.
First you need to remove the node_modules completely and then install the #babel/runtime package
To do with npm :-
npm i #babel/runtime --save OR npm add #babel/runtime
I know it might be late but I have written a Step-by-Step guide on "How to Add Redux into create-react-app".
You can find the link of the blog here.
https://www.realmelon.com/react-redux-how-to-add-redux-into-create-react-app/
Moreover, I have uploaded the Video for the same.
https://www.youtube.com/watch?v=IfRk6mdIb90&t=31s
If you still find any issues in installing "Redux on React", please let me know
Happy Learning

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

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!

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.

Categories

Resources