IMO there is a serious defect in current versions of NPM regarding installation process of dependencies from git repositories. Now it should be easy to deploy, as long as the git executable is available in the environment. node_modules/.bin/npm-git install -save is probably the safest option, as it guarantees the same revision to be installed every time. You can also add a dependency and lock it's sha in one go. This will reinstall all git dependencies, but also write last matching commit's sha to package.json, effectively locking the versions. If you want to lock versions of git dependencies, use. Then install your dependencies as usual: npm install one that you would provide to git clone on command line) - no fancy NPM shortcuts like user/repo or bitbucket:user/repo. Obviously replace *-package-name and git URLs with values relevant to your project. Install npm install -save npm-git-install It is meant as a temporary solution until npm/npm#3055 is resolved. Clones and (re)installs packages from remote git repos.
0 Comments
Leave a Reply. |