无法安装node_modules npm安装错误

时间:2018-10-17 17:46:04

标签: node.js npm

这是在npm install之后显示的错误。我成功地从bitbucket克隆了,我所做的就是git fetch带来另一个分支,但是它没有给我带来什么好处,所以我做了git checkout branchname(分支名称在bitbucket中上传)

Error: Command failed: git config --get remote.origin.url
npm WARN addRemoteGit 
npm WARN addRemoteGit     at ChildProcess.exithandler (child_process.js:291:12)
npm WARN addRemoteGit     at ChildProcess.emit (events.js:182:13)
npm WARN addRemoteGit     at maybeClose (internal/child_process.js:961:16)
npm WARN addRemoteGit     at Socket.stream.socket.on (internal/child_process.js:380:11)
npm WARN addRemoteGit     at Socket.emit (events.js:182:13)
npm WARN addRemoteGit     at Pipe._handle.close (net.js:598:12)
npm WARN addRemoteGit  git+https://github.com/mapsplugin/cordova-plugin-googlemaps-sdk.git#2.7.0 resetting remote /Users/francocoronel/.npm/_git-remotes/git-https-github-com-mapsplugin-cordova-plugin-googlemaps-sdk-git-2-7-0-324aac43 because of error: { Error: Command failed: git config --get remote.origin.url
npm WARN addRemoteGit 
npm WARN addRemoteGit     at ChildProcess.exithandler (child_process.js:291:12)
npm WARN addRemoteGit     at ChildProcess.emit (events.js:182:13)
npm WARN addRemoteGit     at maybeClose (internal/child_process.js:961:16)
npm WARN addRemoteGit     at Socket.stream.socket.on (internal/child_process.js:380:11)
npm WARN addRemoteGit     at Socket.emit (events.js:182:13)
npm WARN addRemoteGit     at Pipe._handle.close (net.js:598:12)
npm WARN addRemoteGit   killed: false,
npm WARN addRemoteGit   code: 1,
npm WARN addRemoteGit   signal: null,
npm WARN addRemoteGit   cmd: 'git config --get remote.origin.url' }
npm WARN deprecated cordova-plugin-contacts@3.0.1: This plugin has been deprecated

1 个答案:

答案 0 :(得分:0)

解决了该问题:npm install -g npm