0

我输入npm install nodegit并收到以下错误

npm ERR! Linux 3.10.0-514.2.2.el7.x86_64
npm ERR! argv "/usr/bin/node" "/bin/npm" "install" "nodegit"
npm ERR! node v6.9.2
npm ERR! npm  v3.10.9
npm ERR! path /opt/portal_server/node_modules/nodegit
npm ERR! code EISGIT

npm ERR! git /opt/portal_server/node_modules/nodegit: Appears to be a git repo or submodule.
npm ERR! git     /opt/portal_server/node_modules/nodegit
npm ERR! git Refusing to remove it. Update manually,
npm ERR! git or move it out of the way first.

npm ERR! Please include the following file with any support request:
npm ERR!     /opt/portal_server/npm-debug.log

您能否提出解决此错误的方法?

4

1 回答 1

0

尝试运行这个

sudo rm -rf node_modules/*/.git/

然后尝试安装nodegit

于 2021-06-22T06:58:46.073 回答