Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

NPM Warns "No Repository Field" but I don't have a repository

Tags:

json

node.js

npm

I'm using node.js at home without a repository, just mucking around. But when I run npm install, I get the No Repository Field warning as discussed in this other question thread.

npmjs.org describes this new package.json field with two examples assuming my repository is in either git or svn, but mine is in neither. I'm not using a repository just yet. What values can I use?

I tried empty strings, null values, and even leaving the Repository object empty.

like image 844
Geurts Avatar asked Mar 05 '14 04:03

Geurts


People also ask

How do I resolve npm deprecated warn?

If you find the same deprecation messages, then you can try to see if there's an open issue in GitHub discussing the deprecation messages. While you can run the npm install command to get the required package version, it's not necessary as the module should still work.

Does npm automatically install dependencies?

NPM installs devDependencies within the package. json file. The 'npm install' command should add all the dependencies and devDependencies automatically during installation. If you need to add specific devDependencies to your project, you can use this command- 'npm install --save-dev'.

Why npm install is not working?

Broken npm installation If your npm is broken: On Mac or Linux, reinstall npm. Windows: If you're on Windows and you have a broken installation, the easiest thing to do is to reinstall node from the official installer (see this note about installing the latest stable version).

What is npm repository?

NPM or Node Package Manager is an open-source repository of tools engineers use to develop applications and websites. NPM is two things: A repository for publishing open-source projects. Simplified version: a digital storage and retrieval facility. A command-line interface (CLI) for interacting with the repository.


1 Answers

As far as I remember, you can specify "private": true in your package.json, and some warnings will be turned off. But you can't publish such package to npm registry.

Unfortunately, you can't turn off this warning in npm completely. But you can use yapm instead of npm, since these warnings are removed in that fork (see it's README).

PS: that said, if you're publishing something to npm, it's usually better to keep the code in the publicly accessible version control system

like image 55
Jerônimo Awotwi Avatar answered Nov 15 '22 23:11

Jerônimo Awotwi