Skip to content

Getting started with Insiders

In order to access the Insiders repository, you need to become an eligible sponsor of Capawesome on Polar. As soon as you have completed the sponsorship, you will automatically receive an invitation from GitHub, giving you 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 configure your CI/CD environment to install the private packages.

GitHub Actions

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

  1. Generate a 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
  2. 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
    

Ionic Appflow

Follow these steps if you are using Ionic Appflow as your CI/CD environment:

  1. Generate a token and add it to your Ionic Appflow environment as an encrypted secret with the name NPM_TOKEN as described in Using private NPM modules
  2. Add the following line to your .npmrc file:

    //npm.pkg.github.com/:_authToken=${NPM_TOKEN}
    

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 (1). Also check that you have accepted the GitHub invitation to the Sponsorware repository (2) 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.

  1. Not all sponsor tiers have access to our sponsorware. Make sure that your selected sponsor tier has the Access to Sponsorware perk.
  2. If you haven't received an invitation by email yet, you can try to accept the invitation via this link.