stewie1570/JSONCasing

JSONCasing appears to be a git repo or submodule

Closed this issue · 0 comments

Test case

Create a new folder and add a package.json:

{
  "name": "json-casing-test",
  "version": "1.0.0",
  "dependencies": {
    "json-casing": "^1.1.2"
  }
}

Run npm install.
Next, run npm install again.
You get the following error:

npm ERR! path /json-casing-test/node_modules/json-casing
npm ERR! code EISGIT
npm ERR! git /json-casing-test/node_modules/json-casing: Appears to be a git repo or submodule.
npm ERR! git     /json-casing-test/node_modules/json-casing
npm ERR! git Refusing to remove it. Update manually,
npm ERR! git or move it out of the way first.

Cause

The published package contains a .git folder. You can verify this by running npm pack and checking the content of the generated tarball.

Solution

Remove all unnecessary files (including the .git folder) from the published package. You can do this by using package.json's files array or .npmignore