我需要從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