npm error occurs because this package includes .git file
See original GitHub issueThis package have .git file in node_modules installed via npm
MY_DIR/node_modules/serverless-plugin-optimize
$ ls -al
total 340
drwxr-xr-x 1 MY_NAME 197121 0 2월 10 19:25 ./
drwxr-xr-x 1 MY_NAME 197121 0 2월 10 19:17 ../
drwxr-xr-x 1 MY_NAME 197121 0 2월 10 19:25 .git/
-rw-r--r-- 1 MY_NAME 197121 1062 10월 26 1985 LICENSE
drwxr-xr-x 1 MY_NAME 197121 0 2월 10 18:10 node_modules/
-rw-r--r-- 1 MY_NAME 197121 2195 2월 10 18:10 package.json
-rw-r--r-- 1 MY_NAME 197121 5905 10월 26 1985 README.md
drwxr-xr-x 1 MY_NAME 197121 0 2월 10 18:09 src/
So it invokes following error It must not be in distributed pacakge
Here is error log
C:\MY_DIR>npm install OTHER_PACAKGE
npm ERR! code EISGIT
npm ERR! path C:\MY_DIR\node_modules\serverless-plugin-optimize
npm ERR! git C:\MY_DIR\node_modules\serverless-plugin-optimize: Appears to be a git repo or submodule.
npm ERR! git C:\MY_DIR\serving\node_modules\serverless-plugin-optimize
npm ERR! git Refusing to remove it. Update manually,
npm ERR! git or move it out of the way first.
npm ERR! A complete log of this run can be found in:
npm ERR! C:\Users\USER_NAME\AppData\Roaming\npm-cache\_logs\2020-02-10T10_12_49_345Z-debug.log
env: windows 10 npm : 6.12.0
Issue Analytics
- State:
- Created 4 years ago
- Reactions:8
- Comments:9 (2 by maintainers)
Top Results From Across the Web
npm install giving error while accessing GIT url - Stack Overflow
Your project depends upon a file css-flip which is stored in another project/repo. while installing npm, your package JSON file will try to ......
Read more >[BUG] Failed to install npm package from git in docker since v6 ...
When I previously post log for issue I investigated the problem. This happens bacuase npm tries to clone ( git clone subprocess) in...
Read more >Can't Read From Remote Git Repository During npm install
This happens when you list a git repository as a dependency in your package.json file. "<somepackage>": "git://github.com/someorg/somerepo.git".
Read more >Common errors | npm Docs
It's most likely a temporary npm registry glitch. Check npm server status and try again later. If the error persists, perhaps the published...
Read more >cannot find module [Node npm Error Solved] - freeCodeCamp
This error occurs because of the following reasons: ... package that is absent in your project directory – npm install package-name or yarn ......
Read more >
Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free
Top Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Thanks for sharing this. So right now with this looks an issue from npm. We can do a PR to at least force the ignore .git
From what @Mantisimo this might also be a scenario of a symbolic link which looks outside of this package.
@Hwan-seok you could create a pr… i’ve found something else interesting… https://github.com/npm/npm-packlist/issues/50 Seems if you have a symbolic link dependency the .git directory could be included.