Another day, another NPM question

Hi, not sure if this is the right category for this question.

I am trying to use this library, Labella, but after running the npm command, there is no package installed anywhere…?

I feel like I keep running into NPM issues and sometimes it’s because I don’t understand completely how it works but sometimes it’s because package managers are bananas. (Mostly, it’s the former).

This is the command I ran:

npm install labella --save

And this is the message I got:

npm WARN saveError ENOENT: no such file or directory, open 'C:\Users\sabahat iqbal\package.json'     
npm WARN enoent ENOENT: no such file or directory, open 'C:\Users\sabahat iqbal\package.json'        
npm WARN bootstrap@4.4.1 requires a peer of jquery@1.9.1 - 3 but none is installed. You must install 
peer dependencies yourself.
npm WARN bootstrap@4.4.1 requires a peer of popper.js@^1.16.0 but none is installed. You must install peer dependencies yourself.
npm WARN sabahat iqbal No description
npm WARN sabahat iqbal No repository field.
npm WARN sabahat iqbal No README data
npm WARN sabahat iqbal No license field.

+ labella@1.1.4
updated 1 package and audited 536 packages in 3.9s

2 packages are looking for funding
  run `npm fund` for details

found 77 vulnerabilities (33 low, 25 moderate, 19 high)
  run `npm audit fix` to fix them, or `npm audit` for details

Help would be greatly appreciated!

Hey @sabbyiqbal :wave:,

Those aren’t errors, they are Warnings but an important ones it seems like. Remember if you want to use any npm packages, make sure to have a package.json file first to save all the dependencies. Without it, doing npm i package --save would be useless, because the --save flag cannot find the package.json to save the dependencies at.

To do this you can just use the npm init or npm init -y to give it all the default values.

There is also a warning saying that your bootstrap requires jqueryand popperjs to be installed to, so you have to install jquery and popperjs yourself using npm.

That’s about it, the last 4 warnings are because you don’t have a package.json

1 Like