Installed Node.js and Terminal says I have vulnerabilities - node.js

I am using Sublime Text. I have installed the Linter package and the ccslint and htmllint. To install the last two I have had to install Node.js on my Mac.
The CSS and HTML linters appear to work fine in Sublime.
However, when I installed the htmllint by typing the following into Terminal
sudo npm install -g htmlhint#latest
I get the following worrying message in Terminal:
In Terminal I’ve typed in and pressed enter:
npm audit fix --force
I get the following
When I installed Node I got the following message, which I don’t understand and have not done anything with. Is this connected with the vulnerabilities? And if so, what do I do?
Help!

The package you installed has vulnerabilities. The maintainers need to update it or it will stay like this. You could of course update their dependency list but stuff might break!

There is not vulnerability report of NodeJS. The vulnerability report if for installed package htmlhint#latest. Take on mind, you will get a well known vulnerability report of all your scope package, every time you install a new one.
If you want to know more about these vulnerabilities run: npm audit without the fix command. Contact the maintainer package in order to get an update.

Related

Why do I receive deprecated package warnings when using npm install

I hope you are doing well!
I got asked about why should I use -f to force npm install packages to install. In the documentation it states that
force npm to fetch remote resources even if a local copy exists on disk.
But does this mean that it redownloads global packages for the local project or what does it solve exactly?
Another thing happens is when I use npm install, I see a lot of warnings in the console that
WARNING: X package is deprecated
But when I run npm outdated I see that all packages are all fairly up to date (all match the recommended version to download), so I assume this might be a dependency for a certain package. But does it affect our work negatively? Why does this happen?
For the packages I download, I generally look for packages that have in the 6 digits Weekly Downloads from npm so I don't think we are using unfamiliar packages.
I am asking these questions because they have been asked to me but I don't have a straight answer to them.
Thank You!
I don't understand how npm install -f works

How to Update Webpack

Here is how you update your webpack-cli for anyone else who was curious. This issue arose when I was creating a new JHipster project, and was having issues with npm start.
First, check your version of webpack by running this command in the terminal of your IDE: webpack --version.
You should see a list that appears like this:
If your "webpack-cli" reads anything below 4.10.0, then you need to update it to the latest version for npm to run properly on your localhost with JHipster. Here's how to update it.
Run this command in the terminal of your IDE: npm install webpack-cli#4.10.0
[Right now, the latest version is 4.10.0, but for the future updates when you run this command, change the version at the end of the command line to updated to that current version. Example:
npm install webpack-cli#(INSERT NEW VERSION DIGITS HERE).
Then re-run webpack --version, and see if your webpack has updated to the version that you entered above. It should now look like this:
EXTRA NOTES:
Why did you have this error? According to webpack.js.org: "...Installing globally locks you down to a specific version of webpack and could fail in projects that use a different version."
So, if you ran a command like this: "npm install --global webpack", then there is a good chance that you were locked down to a specific version. This might have been the error. That's what I believe happened to me anyway. I ran npm install -g, or something of that nature.
Simply us the terminal command npm install webpack-cli#4.10.0 in your IDE's terminal to update it, and you should be good to go! :)
Sources for your journey and research that relate to the material above:
https://webpack.js.org/guides/installation/
https://stackabuse.com/npm-install-specific-version-of-a-package/

Problem in installing handlebar npm package in Node.js

I have tried to install the package but it is showing a lot of vulnerabilities and I cannot fix it properly even after using npm audit fix
enter image description here
If you are doing it for your personal projects then no need to worry about the vulnerabilities and all. The packages have already been installed in your projects.

When using 'npm' it requires me to login to github

Problem When i try to use npm in any way, ex: npm update or npm i package it immediatly gives me a github login prompt.
What i tried using npm with i, install, and even giving it git directly git://. But none worked sadly.
I am new to Node.js. So far (2 weeks), i have been updating, installing and reinstalling dependencies without a problem. Just now this issue occured.
What i was doing before the error occured was nothing special. Just programming. Last thing i used npm for was to install discord.js npm i discord.js.
Thank you in advance.
to have such a problem, it means your command is wrong. take for example you are trying to install angular cli and you omit the # symbol login will pop like so
npm install -g angular/cli // this will trigger login pop-up
npm install -g #angular/cli // will work fine
so check your command
This issue has been resolved. The problem was very simple but i couldn't figure it out at first.
So what was wrong with my issue here was that i accidently while working on my project changed a value in the "Package.json" file. This is ofcourse not intended. With that, my whole project's 'npm' command was broken where it could't work anymore.
Thank you everyone for your time.

Problem installing socket.io on Fedora Core

I'm trying to install socket.io on my machine, but I keep encountering errors when I run npm install socket.io as directed on their website. I'm not sure if I have version incompatibilities for npm or node.js or if I'm simply missing something obvious. As far as I can tell, I have the most recent stable version of both of them.
When I run the install command, the console outputs 40+ errors, and at the end I am given the line npm not ok. Any ideas as to what is going wrong?
What is the error?
Are you installing npm using code from git? I can only guess that you are not using a stable code, because the master branch from git is often unstable.
If that is the case, what you can do is to get the latest code from the git repository and install it again.
$ cd npm
$ git pull
$ make install
Hope it will solved your problem.
You need to provide an error log if you want anyone to try and troubleshoot your problem. It would also be helpful to know whether you installed Node and NPM from source or RPM. Furthermore, if you installed from source, did you do a standard install or did you make customisations?
If you are able to start from scratch, I suggest following the steps below and seeing how you go. Installing into your home directory won't require root and it makes it easier to clear everything out if you need to start again.
Install the stable release of Node in your home directory (use ./configure --prefix=~/Node/)
Set your path as appropriate (ie. PATH=/home/user/Node/bin:$PATH)
Run the standard NPM installer (curl http://npmjs.org/install.sh | sh)

Resources