简体   繁体   中英

Fail to npm install specific commit of angular library from github

Im using Angular 2.0.0-beta.15 and cant upgrade it, so I had to find a specific commit from github library ( ng2-dnd ).

So I found this commit that support 2.0.0-beta.17 which should work for me:

"ng2-dnd": "git://github.com/akserg/ng2-dnd.git#87a6cc0d395ebc2d14734769a3190836c8af6e1a"

but when I go npm install I get some error:

npm ERR! addLocal Could not install /var/folders/n6/3vqr57k94_z7ynl99yvvtv1r0000gn/T/npm-9640-99198f21/git-cache-fef0b17f/87a6cc0d395ebc2d14734769a3190836c8af6e1a
npm ERR! Darwin 15.3.0
npm ERR! argv "/usr/local/Cellar/node/5.6.0/bin/node" "/usr/local/bin/npm" "install"
npm ERR! node v5.6.0
npm ERR! npm  v3.6.0

npm ERR! No version provided in package.json
npm ERR!
npm ERR! If you need help, you may report this error at:
npm ERR!     <https://github.com/npm/npm/issues>

does someone knows how can I get over this?

thanks!

You can use ng2-dnd version 1.5.0

Update your package.json with:

"ng2-dnd" : "1.5.0"

I fixed the No version provided in package.json problem by upgrading npm from version 3.xx to version to 6.xx with npm install -g npm .

Looks like the newer versions of npm are not so strict on package.json requirements anymore (fe specifying a GitHub repo without a version in package.json works with newer npm versions).

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM