0

我需要安装这个包。我在 node_modules 文件夹中,我这样做:

URL: https://github.com/SparkPost/node-sparkpost


npm install sparkpost

我得到这个错误:

npm ERR! Linux 3.19.0-47-generic
npm ERR! argv "node" "/usr/local/bin/npm" "install" "sparkpost"
npm ERR! node v0.10.25
npm ERR! npm  v3.9.2
npm ERR! path /home/francedema/Scrivania/Virtual Vagrant/Centos/nodebb/node_modules/bootstrap-colorpicker
npm ERR! code EISGIT

npm ERR! git /home/francedema/Scrivania/Virtual Vagrant/Centos/nodebb/node_modules/bootstrap-colorpicker: Appears to be a git repo or submodule.
npm ERR! git     /home/francedema/Scrivania/Virtual Vagrant/Centos/nodebb/node_modules/bootstrap-colorpicker
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!     /home/francedema/Scrivania/Virtual Vagrant/Centos/nodebb/npm-debug.log

任何人都可以帮助我吗?

4

1 回答 1

3

package.json您应该从与您的文件相同的目录安装 NPM 包。查看您的代码,您将需要执行以下操作:

cd "/home/francedema/Scrivania/Virtual Vagrant/Centos/nodebb"
npm install --save sparkpost

--save选项会将 sparkpost 添加到您的 package.json 依赖项中。

看起来你也可能因为bootstrap-colorpicker包而有一些错误。我会先尝试从正确的目录安装,看看是否有帮助。

于 2016-06-15T14:13:16.120 回答