Skip to content

docs : Clarify .npmrc setup for Windows users in Developer Guide #472

@saishmungase

Description

@saishmungase

Hi team 👋,

While setting up the project on Windows, I noticed that the Developer Guide shows the following command to configure the GitHub Packages token:

echo "//npm.pkg.github.com/:_authToken=[YOUR_GITHUB_PERSONAL_ACCESS_TOKEN]" >> ~/.npmrc

However, this works only on Linux/macOS.
For Windows users, the .npmrc file is located at:

C:\Users\<username>\.npmrc 

and the equivalent PowerShell command is:

Set-Content $env:USERPROFILE\.npmrc "@sugarlabs:registry=https://npm.pkg.github.com`n//npm.pkg.github.com/:_authToken=YOUR_TOKEN_HERE"

Without this Windows-specific instruction, npm fails to resolve the package from @sugarlabs because the registry is not properly set.

Suggestion:

Add a short Windows subsection under the PAT setup section.

On Windows (PowerShell):
Run this single command to configure .npmrc with both the registry and authentication token:

Set-Content $env:USERPROFILE\.npmrc "@sugarlabs:registry=https://npm.pkg.github.com`n//npm.pkg.github.com/:_authToken=YOUR_TOKEN_HERE"
  • Replace YOUR_TOKEN_HERE with your GitHub Personal Access Token (PAT).
  • This ensures npm can fetch @sugarlabs scoped packages and avoids 401 Unauthorized errors.

This small addition would prevent confusion for Windows contributors.
Thanks! 🙌

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions