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.
Asked
Active
Viewed 127 times
-1
-
Okay? And what is your *question*? – Karl Knechtel May 19 '20 at 06:22
-
It's not true that it doesn't include dependencies. It's just that the uuid module has no dependencies – slebetman May 19 '20 at 06:48
-
I am curious why `npm install` installs .cmd and .ps1 files for me. I am new to NPM, watched tutorials on youtube and they don't have those files. How do I fixt that? – Woon Mar May 19 '20 at 10:00
2 Answers
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.

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
-
-
0
I solved the issue by completely uninstalled and reinstall Node.JS following this post

Woon Mar
- 121
- 1
- 4