Chord OMS
...
Developer Tools
Developer Guides

npm Access for @chordcommerce Packages

4min

All of Chord's Javascript packages are private and distributed through Github Packages. In order to install these packages, you must configure your package manager of choice to use Github Packages for all packages in the @chordcommerce namespace.

Step 1: Gain Access To Relevant Chord Commerce Repositories

First, you will need to ensure that you have access to Chord's Javascript repositories. You can determine if you have access by clicking on the following links.

If you do not have access to these repositories, reach out to Chord for access with your Github username.

Step 2: Configure Package Managers

First, you must generate a Github personal access token with the read:packages packages scope. This can be done by visiting https://github.com/settings/tokens and clicking "Generate Token".

How to generate a read:packages Github access token
How to generate a read:packages Github access token


Next, you must take that token and add the following lines to ~/.npmrc :

~/.npmrc


This means that any npm packages with the @chordcommerce scope will be installed from Github Packages instead of the npm public registry. If you have any trouble on this step, see Github's documentation on configuring npm for use with Github Packages.

Step 3: Install Packages

If step 2 is done correctly, commands like the following should work without any issues.

yarn
npm