我需要从git中使用标记= tag = 6.0.0来从我的angular2项目执行npm install。使用标记从github安装NPM
例如
git [email protected]:akveo/ng2-smart-table.git
cd ng2-smart-table
git checkout tags/v0.6.0-0
我会怎么做等价的:
npm install --save PACKAGE_NAME
npm install [email protected]:akveo/ng2-smart-table.git#v0.6.0-0
npm ERR! Darwin 16.4.0
npm ERR! argv "/usr/local/Cellar/node/6.5.0/bin/node" "/usr/local/bin/npm" "install" "[email protected]:akveo/ng2-smart-table.git#v0.6.0-0"
npm ERR! node v7.0.0
npm ERR! npm v3.10.8
npm ERR! Unsupported URL Type: github.com:akveo/ng2-smart-table.git#v0.6.0-0
npm ERR!
npm ERR! If you need help, you may report this error at:
npm ERR! <https://github.com/npm/npm/issues>
npm ERR! Please include the following file with any support request:
我添加了错误,当我想你的建议 – Tampa
@Tampa你错过了协议,我用'npm install git + https://[email protected]:akveo/ng2-smart-table.git#v0.6.0-0'进行了测试,它工作正常。 – paradite