I have installed node.js along with npm module manager. I have created a package.json file and from the root directory I am trying to execute npm install
command but I am getting npm WARN package.json
project name (in my case it is NodejsDemo
) @0.0.0 No repository field
.
Asked
Active
Viewed 1,396 times
0

Cœur
- 37,241
- 25
- 195
- 267

Pooja Asthana
- 1
- 2
-
Does this answer your question? [npm WARN package.json: No repository field](https://stackoverflow.com/questions/16827858/npm-warn-package-json-no-repository-field) – Henke Jun 30 '21 at 12:49
2 Answers
1
From using a package.json
- As a bare minimum, a package.json must have:
- "name"
- all lowercase
Try lowercase name like nodejsdemo
and you should add repository like
"repository": {
"type": "git",
"url": "git://git_repo_link_here"
}
but it's only warning and it doesn't affect on installation.

Krystian Czaplicki
- 11
- 2
-
-
In your project.json. On [using a package.json](https://docs.npmjs.com/getting-started/using-a-package.json) you have sample project.json, you can also use command npm init to generate a project.json. – Krystian Czaplicki Oct 14 '16 at 12:11
0
If you want to create package.json
file manually then use
`npm init`
command to create your package.json
file
Do this command in your root folder
It will ask to give some information during creation.
After creating file, you can use it.
and if you want to save your new modules in your package.json
just do like this
for example install async module
npm install async --save
and async module name with version will appear in your package.json file

abdulbarik
- 6,101
- 5
- 38
- 59