Lanka Developers Community

    Lanka Developers

    • Register
    • Login
    • Search
    • Categories
    • Recent
    • Tags
    • Popular
    • Users
    • Groups
    • Shop

    How to install npm package from bitbucket private repository

    Programming
    npm bitbucket git
    2
    2
    344
    Loading More Posts
    • Oldest to Newest
    • Newest to Oldest
    • Most Votes
    Reply
    • Reply as topic
    Log in to reply
    This topic has been deleted. Only users with topic management privileges can see it.
    • lkdev
      lkdev last edited by

      I build a npm package for my future projects , but i don't know how to install that package from bitbucket , please tell me the process.

      1 Reply Last reply Reply Quote 0
      • root
        root Linux Help last edited by root

        Declare dependencies in your nodejs app package.json:

        "dependencies": {
           "modulename":"git+https://[email protected]/lanakdevelopers/modulename.git",
           "ejs": "1.0.0"
        }
        

        Then follow below steps

        • Turn on git cache, keep password in the cache for a certain period of time
        git config --global credential.helper cache
        git config --global credential.helper 'cache --timeout=3600'
        
        • Access your private repository once, type your bitbucket password when prompted
        git ls-remote https://[email protected]/lankadevelopers/modulename.git
        

        Now you can install packages using npm install

        1 Reply Last reply Reply Quote 0
        • 1 / 1
        • First post
          Last post

        2
        Online

        3.7k
        Users

        1.3k
        Topics

        5.3k
        Posts

        • Privacy
        • Terms & Conditions
        • Donate

        © Copyrights and All right reserved Lanka Developers Community

        Powered by Axis Technologies (PVT) Ltd

        Made with in Sri Lanka

        | |