Skip to content

[BUG] Scoped npm packages containing a dot (.) fail to (un)install and/or update #4007

@igorskyflyer

Description

Please confirm these before moving forward

  • I have searched for my issue and have not found a work-in-progress/duplicate/resolved issue.
  • I have tested that this issue has not been fixed in the latest (beta or stable) release.
  • I have checked the FAQ section for solutions.
  • This issue is about a bug (if it is not, please use the correct template).

UniGetUI Version

3.3.1

Windows version, edition, and architecture

Windows 11 Pro 10.0.26100 x64

Describe your issue

Hello,
I am an author of multiple npm packages that are scoped i.e. @scope/package-name and while trying to update my own package (@igor.dvlpr/astro-component) using UniGetUI I encountered an error. Upon further inspection and going through the app's logs I noticed that the passed arguments are wrong. See details below.


I have forked the repo, worked on the fix and would be happy to open a PR if you’re open to it.

Steps to reproduce the issue

  1. Install globally a package with a dot in the scope name, e.g. @igor.dvlpr/astro-component, purposefully use an older version to trigger UniGetUI update query, i.e.
npm i -g '@igor.dvlpr/astro-component@1.0.1'
  1. Open UniGetUI
  2. Check for npm packages updates
  3. Try to update @igor.dvlpr/astro-component
  4. An error will occur

UniGetUI Log

[Fri 15-08-2025 20:05:39] LoadComponentsAsync finished executing. All managers loaded. Proceeding to interface.
[Fri 15-08-2025 20:05:40] Dependency cargo-update for manager Cargo is present
[Fri 15-08-2025 20:05:40] Integrity check passed successfully!
[Fri 15-08-2025 20:05:40] Call to WhichMultiple with file cargo-binstall.exe returned non-zero status 1
[Fri 15-08-2025 20:05:40] Command cargo-binstall.exe was not found on the system
[Fri 15-08-2025 20:05:40] Dependency cargo-binstall was not found for manager Cargo, marking to prompt...
[Fri 15-08-2025 20:05:44] Found 0 installed packages from Chocolatey
[Fri 15-08-2025 20:05:45] Found 3 installed packages from Pip
[Fri 15-08-2025 20:05:46] Found 3 available updates from Pip
[Fri 15-08-2025 20:05:46] Found 10 installed packages from Npm
[Fri 15-08-2025 20:05:47] Found 0 available updates from Chocolatey
[Fri 15-08-2025 20:05:47] Found 1 installed packages from PowerShell
[Fri 15-08-2025 20:05:47] Found 0 installed packages from PowerShell7
[Fri 15-08-2025 20:05:47] Found 0 available updates from Cargo
[Fri 15-08-2025 20:05:47] Found 1 installed packages from Cargo
[Fri 15-08-2025 20:05:48] Found 2 installed packages from .NET Tool
[Fri 15-08-2025 20:05:48] Found 2 installed packages from .NET Tool
[Fri 15-08-2025 20:05:48] Found 0 installed packages from PowerShell7
[Fri 15-08-2025 20:05:48] Found 0 available updates from PowerShell7
[Fri 15-08-2025 20:05:48] Downloaded new icons and screenshots successfully!
[Fri 15-08-2025 20:05:49] Found 179 installed packages from Winget
[Fri 15-08-2025 20:05:49] Found 0 available updates from .NET Tool
[Fri 15-08-2025 20:05:49] Found 2 available updates from Winget
[Fri 15-08-2025 20:05:50] Found 1 installed packages from PowerShell
[Fri 15-08-2025 20:05:50] Found 3 available updates from Npm
[Fri 15-08-2025 20:05:50] Found 1 available updates from PowerShell
[Fri 15-08-2025 20:06:00] Loaded operation parameters for package id=@igor.dvlpr/astro-component on manager Npm and operation Update: install @igor.dvlpr/astro-component@1.1.0 @igor.dvlpr/astro-component --global
[Fri 15-08-2025 20:06:00] Loaded operation parameters for package id=typescript on manager Npm and operation Update: install typescript@5.9.2 typescript --global

Package Managers Logs

——————————————————————————————————————————

Logged subprocess-based task on manager Npm. Task type is ListUpdates
Subprocess executable: "C:\WINDOWS\system32\windowspowershell\v1.0\powershell.exe"
Command-line arguments: "-NoProfile -ExecutionPolicy Bypass -Command "C:\Users\SkyFlyer\AppData\Roaming\npm\npm.ps1"  outdated --json --global"
Process start time: Fri 15-08-2025 20:05:48
Process end time:   Fri 15-08-2025 20:05:50

-- Process STDOUT
 ...

Return code: FAILED (0x1, 1, 1)

——————————————————————————————————————————

Relevant information

Following the official npm documentation which states:

A package.json file must contain "name" and "version" fields.

The "name" field contains your package's name and must be lowercase without any spaces. May contain hyphens, dots, and underscores.

The same rules apply to scope name; thus, it can contain dots, hyphens and underscores.


When a scope does NOT contain a dot, UniGetUI passes the arguments correctly - actually, PowerShell parses them correctly.

This

#
# Works
npm i @scope/my-package

gets processed correctly by PowerShell.

But this does not:

#
# Does not work
npm i @my.scope/my-package

PowerShell will throw an exception:
The splatting operator '@' cannot be used to reference variables in an expression. '@my' can be used only as an argument to a command. To reference variables in an expression use '$my'.

The exception occurs because it tries to access a property, in this case, it tries to access the property scope/my-package of the variable my - neither of those exists, nor is valid.

The only fix is luckily a catch-all fix. There are no side-effects for packages that do NOT contain the above-mentioned characters. The solution is to always wrap the package name with single quotes.

npm i -g @igor.dvlpr/astro-component
npm i -g typescript

becomes

npm i -g '@igor.dvlpr/astro-component'
npm i -g 'typescript'

Screenshots and videos

Screenshot by Igor Dimitrijević (igorskyflyer) Figure 1. An error dialog after an attempt to install the mentioned npm package

Metadata

Metadata

Labels

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions