-1

So I am trying to run npm install uuid to add dependencies to package.json file. But instead, it gives me bunch of js files including uuid.cmd and uuid.ps1 files. The package.json also doesn't include uuid dependency.

https://i.stack.imgur.com/TGX29.png

Mofi
  • 46,139
  • 17
  • 80
  • 143
Woon Mar
  • 121
  • 1
  • 4

2 Answers2

0

In order to add node package to the package.json file you need to add --save flag after the npm install command. So you can run below command in order to add uuid package to your package.json file.

 npm install uuid --save

uuid package already have bunch of different versions and make sure to use the correct version according to your requirement.

https://www.npmjs.com/package/uuid

Kasunaz
  • 573
  • 5
  • 17
  • I tried `npm install uuid --save` and it gave me the same result. No dependency added to package.json but added bunches of files I don't know like `uuid.cmd`and `uuid.ps1`. I also have this issue with laravel framework. `npm install` installs so many `.cmd` and `.ps1` files. – Woon Mar May 19 '20 at 10:06
  • try it by removing the existing node modules folder. – Kasunaz May 19 '20 at 10:37
  • what are the npm and node version that you are using? – Kasunaz May 19 '20 at 10:38
0

I solved the issue by completely uninstalled and reinstall Node.JS following this post

How to completely remove node.js from Windows

Woon Mar
  • 121
  • 1
  • 4