Skip to content

Getting started with Insiders

In order to access the Insiders repository, you need to become an eligible sponsor of @capawesome-team on GitHub. GitHub will then send you an invitation within a few hours, giving you access to the sponsorware repository.

Info

If you sponsored as an organization, please drop us a short message at support@capawesome.io and include the username of an individual GitHub account that should have read access to the sponsorware repository.

Requirements

After you've been added to the list of collaborators and accepted the repository invitation, the next step is to create a personal access token for your GitHub account in order to access GitHub Packages programmatically:

  1. Go to https://github.com/settings/tokens
  2. Click on Generate a new token (classic)
  3. Enter a name and select the read:packages scope
  4. Generate the token and log in to the GitHub Packages npm registry (GitHub Docs):

    $ npm login --scope=@capawesome-team --auth-type=legacy --registry=https://npm.pkg.github.com
    
    > Username: GITHUB_USERNAME
    > Password: GITHUB_TOKEN
    > Email: PUBLIC_EMAIL_ADDRESS
    
Warning

Be careful not to disclose your npm auth token! If you have any questions, please let us know. Follow the instructions in CI/CD Configuration to log in to GitHub packages in a CI/CD environment.

Installation

  1. In the same directory as your projects package.json file, create or edit an .npmrc file to include the following line (GitHub Docs):

    @capawesome-team:registry=https://npm.pkg.github.com
    
  2. Install the plugin:

    npm install @capawesome-team/<plugin-name>
    npx cap sync
    

CI/CD Configuration

Follow the steps in this section to log in to the GitHub packages in your CI/CD environment so that you can install the private npm packages.

GitHub Actions

Follow these steps if you are using GitHub Actions as your CI/CD environment:

  1. Go to https://github.com/settings/tokens
  2. Click on Generate a new token (classic)
  3. Enter a name and select the read:packages scope
  4. Generate the token and add it to your repository as an encrypted secret with the name NPM_TOKEN as described in Creating encrypted secrets for a repository
  5. Add the following step to your GitHub Actions workflow before installing the npm dependencies:

    - name: Set npm access token for GitHub registry
      run: echo "//npm.pkg.github.com/:_authToken=${{ secrets.NPM_TOKEN }}" >> .npmrc
    

Common issues

npm ERR! code E403

If you get npm ERR! code E403 as an error during installation, then check if you are already an Insider Sponsor of @capawesome-team on GitHub. Also check that you have accepted the GitHub invitation to the Sponsorware repository and that you generated the token as described in Requirements. If the error remains or you have any other problems please contact us by mail.