-
Notifications
You must be signed in to change notification settings - Fork 150
Open
Description
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]" >> ~/.npmrcHowever, 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_HEREwith 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
Labels
No labels