UniGetUI icon indicating copy to clipboard operation
UniGetUI copied to clipboard

[FEATURE REQUEST] Allow specifying package manager path

Open CyanCX2 opened this issue 1 year ago • 6 comments

Please confirm these before moving forward

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

UniGetUI Version

3.1.1

Windows version, edition, and architecture

Windows 11 Pro 23H2 22631.4037 x64

Describe your issue

UniGetUI doesn't seem to recognize npm when node installation is managed by a version manager such as fnm. This is most likely due to NPM not being added to PATH which makes sense for a version manager to handle by itself. Having the ability to set the NPM path manually would solve this issue.

Steps to reproduce the issue

No response

UniGetUI Log

[8/23/2024 8:36:33 PM]    __  __      _ ______     __  __  ______
                         / / / /___  (_) ____/__  / /_/ / / /  _/
                        / / / / __ \/ / / __/ _ \/ __/ / / // /
                       / /_/ / / / / / /_/ /  __/ /_/ /_/ // /
                       \____/_/ /_/_/\____/\___/\__/\____/___/
                           Welcome to UniGetUI Version 3.1.1
[8/23/2024 8:36:33 PM]
[8/23/2024 8:36:33 PM] Version Code:  3.11
[8/23/2024 8:36:33 PM] Encoding Code Page set to 437
[8/23/2024 8:36:33 PM] Loaded language locale: en
[8/23/2024 8:36:33 PM] Randomly-generated background API auth token for the current session: y9p2c5calwm19m36qifnlzkabopj35cr1uusf3iyjrsjwr4759xlwmkasowni272
[8/23/2024 8:36:34 PM] Api running on http://localhost:7058
[8/23/2024 8:36:34 PM] Using System GSudo at C:\tools\gsudo\Current\gsudo.exe
[8/23/2024 8:36:34 PM] Command npm was not found on the system
[8/23/2024 8:36:34 PM] ▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄
                       █▀▀▀▀▀▀▀▀▀▀▀▀▀ MANAGER LOADED ▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀
                       █ Name: Npm
                       █ Enabled: True
                       █ Found: False
                       █ THE MANAGER WAS NOT FOUND. PERHAPS IT IS NOT 
                       █ INSTALLED OR IT HAS BEEN MISCONFIGURED 
                       ▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀
[8/23/2024 8:36:34 PM] ▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄
                       █▀▀▀▀▀▀▀▀▀▀▀▀▀ MANAGER LOADED ▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀
                       █ Name: PowerShell7
                       █ Enabled: False
                       █ THE MANAGER IS DISABLED
                       ▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀
[8/23/2024 8:36:34 PM] ▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄
                       █▀▀▀▀▀▀▀▀▀▀▀▀▀ MANAGER LOADED ▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀
                       █ Name: .NET Tool
                       █ Enabled: True
                       █ Found: True
                       █ Fancy exe name: dotnet tool
                       █ Executable path: C:\Program Files\dotnet\dotnet.exe
                       █ Call arguments: tool
                       █ Version: 
                       █   8.0.400
                       ▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀
[8/23/2024 8:36:35 PM] ▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄
                       █▀▀▀▀▀▀▀▀▀▀▀▀▀ MANAGER LOADED ▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀
                       █ Name: Winget
                       █ Enabled: True
                       █ Found: True
                       █ Fancy exe name: winget.exe
                       █ Executable path: C:\Users\user\AppData\Local\Microsoft\WindowsApps\winget.exe
                       █ Call arguments: 
                       █ Version: 
                       █   System WinGet CLI Version: v1.8.1911
                       █   Microsoft.WinGet.Client PSModule version: ""
                       █   Using Native WinGet helper (COM Api)
                       ▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀
[8/23/2024 8:36:35 PM] ▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄
                       █▀▀▀▀▀▀▀▀▀▀▀▀▀ MANAGER LOADED ▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀
                       █ Name: Pip
                       █ Enabled: True
                       █ Found: True
                       █ Fancy exe name: pip
                       █ Executable path: C:\Python312\python.exe
                       █ Call arguments:  -m pip
                       █ Version: 
                       █   pip 24.2 from C:\Python312\Lib\site-packages\pip (python 3.12)
                       ▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀
[8/23/2024 8:36:36 PM] ▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄
                       █▀▀▀▀▀▀▀▀▀▀▀▀▀ MANAGER LOADED ▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀
                       █ Name: Scoop
                       █ Enabled: True
                       █ Found: True
                       █ Fancy exe name: scoop
                       █ Executable path: C:\Windows\system32\windowspowershell\v1.0\powershell.exe
                       █ Call arguments:  -NoProfile -ExecutionPolicy Bypass -Command scoop
                       █ Version: 
                       █   Current Scoop version:
                       █   859d1db5 chore(release): Bump to version 0.5.2 (#6080)
                       █   
                       █   'main' bucket:
                       █   fe5fbd388 circleci-cli: Update to version 0.1.30995
                       █   
                       █   'versions' bucket:
                       █   8f7e21658 neochat-nightly: Update to version 9261
                       █   
                       █   'nerd-fonts' bucket:
                       █   b17bbac0 SarasaGothic: Update to version 1.0.19
                       ▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀
[8/23/2024 8:36:36 PM] ▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄
                       █▀▀▀▀▀▀▀▀▀▀▀▀▀ MANAGER LOADED ▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀
                       █ Name: Chocolatey
                       █ Enabled: True
                       █ Found: True
                       █ Fancy exe name: choco.exe
                       █ Executable path: C:\ProgramData\chocolatey\bin\choco.exe
                       █ Call arguments: 
                       █ Version: 
                       █   2.3.0
                       ▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀
[8/23/2024 8:36:36 PM] UniGetUI is up to date
[8/23/2024 8:36:36 PM] ▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄
                       █▀▀▀▀▀▀▀▀▀▀▀▀▀ MANAGER LOADED ▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀
                       █ Name: PowerShell
                       █ Enabled: True
                       █ Found: True
                       █ Fancy exe name: powershell.exe
                       █ Executable path: C:\Windows\system32\windowspowershell\v1.0\powershell.exe
                       █ Call arguments:  -NoProfile -Command
                       █ Version: 
                       █   Name                           Value                                                                                   
                       █   ----                           -----                                                                                   
                       █   PSVersion                      5.1.22621.3958                                                                          
                       █   PSEdition                      Desktop                                                                                 
                       █   PSCompatibleVersions           {1.0, 2.0, 3.0, 4.0...}                                                                 
                       █   BuildVersion                   10.0.22621.3958                                                                         
                       █   CLRVersion                     4.0.30319.42000                                                                         
                       █   WSManStackVersion              3.0                                                                                     
                       █   PSRemotingProtocolVersion      2.3                                                                                     
                       █   SerializationVersion           1.1.0.1
                       ▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀
[8/23/2024 8:36:37 PM] Microsoft.Powershell.Client detection has been forcefully skipped as the module is not required on the current context
[8/23/2024 8:36:37 PM] Dependency WinGet PowerShell Module for manager Winget is present
[8/23/2024 8:36:38 PM] Dependency Scoop-Search for manager Scoop is present
[8/23/2024 8:36:38 PM] Dependency Git for manager Scoop is present
[8/23/2024 8:36:39 PM] Dependency .NET Tools Outdated for manager .NET Tool is present
[8/23/2024 8:36:39 PM] LoadComponentsAsync finished executing. All managers loaded. Proceeding to interface.
[8/23/2024 8:36:39 PM] Found 14 installed packages from Pip
[8/23/2024 8:36:39 PM] Found 6 installed packages from Scoop
[8/23/2024 8:36:39 PM] Downloaded new icons and screenshots successfully!
[8/23/2024 8:36:39 PM] Found 50 installed packages from Chocolatey
[8/23/2024 8:36:39 PM] Found 1 installed packages from .NET Tool
[8/23/2024 8:36:40 PM] Found 4 installed packages from PowerShell
[8/23/2024 8:36:41 PM] Found 0 available updates from .NET Tool
[8/23/2024 8:36:42 PM] Found 0 available updates from Chocolatey

Package Managers Logs

Manager Npm with version:


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

Relevant information

No response

Screenshots and videos

No response

CyanCX2 avatar Aug 23 '24 17:08 CyanCX2

exactly searching for this
the way fnm works is a bit weird tbh, the node.js installs are located in the FNM_DIR env var (if set, idk the default one), and then they basically symlink to this folder and add to path dynamically per shell session on %LOCALAPPDATA%\fnm_multishells
This folder contains dozens of folders, where most of them link to nowhere, and the symlinks are created/activated at each session opening (considering that you init fnm in your Powershell profile, ex with fnm env --use-on-cd --version-file-strategy=recursive --shell power-shell | Out-String | Invoke-Expression)

so for example, here's what's in the symlinks folder when a powershell session is active :

   ❯❯ C:\Users\EDM115\AppData\Local\fnm_multishells
    ❯ ls

        Directory: C:\Users\EDM115\AppData\Local\fnm_multishells


Mode                LastWriteTime         Length Name
----                -------------         ------ ----
l----        26/08/2024     19:46                  10268_1724694303272 󰁕 Z:\_fnm_\Nothing\Should\Be\Here\installation
l----        27/08/2024     14:28                  10328_1724761701453 󰁕 Z:\_fnm_\Nothing\Should\Be\Here\installation
l----        21/08/2024     14:15                  10376_1724242501972 󰁕 Z:\_fnm_\Nothing\Should\Be\Here\installation
l----        28/08/2024     17:28                  10588_1724858910674 󰁕 D:\EDM115\Programmes\fnm\node-versions\v22.7.0\installation
l----        28/08/2024     18:33                  10620_1724862829201 󰁕 D:\EDM115\Programmes\fnm\node-versions\v22.7.0\installation
l----        21/08/2024     15:03                  10700_1724245396644 󰁕 Z:\_fnm_\Nothing\Should\Be\Here\installation
l----        20/08/2024     16:55                  10960_1724165759019 󰁕 Z:\_fnm_\Nothing\Should\Be\Here\installation
l----        24/08/2024     08:42                  11140_1724481764885 󰁕 Z:\_fnm_\Nothing\Should\Be\Here\installation
l----        28/08/2024     16:55                  11332_1724856918663 󰁕 D:\EDM115\Programmes\fnm\node-versions\v20.16.0\installation
l----        28/08/2024     17:32                  11400_1724859119951 󰁕 D:\EDM115\Programmes\fnm\node-versions\v22.7.0\installation
l----        26/08/2024     15:29                  11416_1724678957413 󰁕 Z:\_fnm_\Nothing\Should\Be\Here\installation
l----        20/08/2024     17:11                  11444_1724166678720 󰁕 Z:\_fnm_\Nothing\Should\Be\Here\installation
l----        26/08/2024     10:04                  11496_1724659443308 󰁕 Z:\_fnm_\Nothing\Should\Be\Here\installation
l----        25/08/2024     20:19                  11580_1724609989495 󰁕 Z:\_fnm_\Nothing\Should\Be\Here\installation
l----        20/08/2024     16:52                  11612_1724165573911 󰁕 Z:\_fnm_\Nothing\Should\Be\Here\installation
l----        23/08/2024     13:52                  11628_1724413690198 󰁕 Z:\_fnm_\Nothing\Should\Be\Here\installation
l----        21/08/2024     14:49                  11688_1724244551081 󰁕 Z:\_fnm_\Nothing\Should\Be\Here\installation
l----        20/08/2024     11:32                  11800_1724146373467 󰁕 Z:\_fnm_\Nothing\Should\Be\Here\installation
l----        20/08/2024     11:27                  11812_1724146076813 󰁕 Z:\_fnm_\Nothing\Should\Be\Here\installation
l----        21/08/2024     17:39                  11872_1724254745680 󰁕 Z:\_fnm_\Nothing\Should\Be\Here\installation
l----        21/08/2024     15:05                  11988_1724245551599 󰁕 Z:\_fnm_\Nothing\Should\Be\Here\installation
l----        24/08/2024     13:02                  12000_1724497320361 󰁕 Z:\_fnm_\Nothing\Should\Be\Here\installation
l----        29/08/2024     08:28                  12000_1724912937464 󰁕 D:\EDM115\Programmes\fnm\node-versions\v22.7.0\installation
l----        21/08/2024     14:44                  12004_1724244281211 󰁕 Z:\_fnm_\Nothing\Should\Be\Here\installation
l----        21/08/2024     14:20                  12020_1724242832032 󰁕 Z:\_fnm_\Nothing\Should\Be\Here\installation
l----        27/08/2024     11:41                  12092_1724751669236 󰁕 Z:\_fnm_\Nothing\Should\Be\Here\installation
l----        23/08/2024     20:04                  12104_1724436251713 󰁕 Z:\_fnm_\Nothing\Should\Be\Here\installation
l----        29/08/2024     08:49                  12144_1724914186553 󰁕 D:\EDM115\Programmes\fnm\node-versions\v22.7.0\installation
l----        28/08/2024     16:12                  12200_1724854378964 󰁕 Z:\_fnm_\Nothing\Should\Be\Here\installation
l----        24/08/2024     20:31                  12272_1724524289589 󰁕 Z:\_fnm_\Nothing\Should\Be\Here\installation
l----        20/08/2024     10:10                  12356_1724141408397 󰁕 Z:\_fnm_\Nothing\Should\Be\Here\installation
l----        20/08/2024     17:00                  12452_1724166001196 󰁕 Z:\_fnm_\Nothing\Should\Be\Here\installation
l----        28/08/2024     10:03                  12556_1724832183681 󰁕 Z:\_fnm_\Nothing\Should\Be\Here\installation
l----        23/08/2024     20:31                  12680_1724437908635 󰁕 Z:\_fnm_\Nothing\Should\Be\Here\installation
l----        26/08/2024     16:12                  12764_1724681530955 󰁕 Z:\_fnm_\Nothing\Should\Be\Here\installation
l----        24/08/2024     08:56                  12804_1724482562284 󰁕 Z:\_fnm_\Nothing\Should\Be\Here\installation
l----        25/08/2024     20:18                  12836_1724609926301 󰁕 Z:\_fnm_\Nothing\Should\Be\Here\installation
l----        25/08/2024     12:12                  12872_1724580747863 󰁕 Z:\_fnm_\Nothing\Should\Be\Here\installation
l----        20/08/2024     16:54                  12916_1724165643878 󰁕 Z:\_fnm_\Nothing\Should\Be\Here\installation
l----        24/08/2024     13:01                  12952_1724497316577 󰁕 Z:\_fnm_\Nothing\Should\Be\Here\installation
l----        20/08/2024     11:24                  12992_1724145866026 󰁕 Z:\_fnm_\Nothing\Should\Be\Here\installation
l----        25/08/2024     12:24                  13028_1724581460799 󰁕 Z:\_fnm_\Nothing\Should\Be\Here\installation
l----        25/08/2024     12:10                  13156_1724580612674 󰁕 Z:\_fnm_\Nothing\Should\Be\Here\installation
l----        28/08/2024     17:44                  13484_1724859864593 󰁕 D:\EDM115\Programmes\fnm\node-versions\v22.7.0\installation
l----        28/08/2024     16:44                  13776_1724856293442 󰁕 Z:\_fnm_\Nothing\Should\Be\Here\installation
l----        20/08/2024     13:56                  13796_1724155012768 󰁕 Z:\_fnm_\Nothing\Should\Be\Here\installation
l----        28/08/2024     16:08                  13916_1724854103182 󰁕 Z:\_fnm_\Nothing\Should\Be\Here\installation
l----        21/08/2024     14:22                  13940_1724242945553 󰁕 Z:\_fnm_\Nothing\Should\Be\Here\installation
l----        20/08/2024     11:28                  13988_1724146102461 󰁕 Z:\_fnm_\Nothing\Should\Be\Here\installation
l----        24/08/2024     16:13                  14000_1724508813002 󰁕 Z:\_fnm_\Nothing\Should\Be\Here\installation
l----        21/08/2024     14:45                  14168_1724244316584 󰁕 Z:\_fnm_\Nothing\Should\Be\Here\installation
l----        28/08/2024     18:09                  1432_1724861377496 󰁕 D:\EDM115\Programmes\fnm\node-versions\v22.7.0\installation
l----        20/08/2024     17:14                  14724_1724166892893 󰁕 Z:\_fnm_\Nothing\Should\Be\Here\installation
l----        20/08/2024     13:58                  15144_1724155099234 󰁕 Z:\_fnm_\Nothing\Should\Be\Here\installation
l----        24/08/2024     14:32                  16052_1724502722242 󰁕 Z:\_fnm_\Nothing\Should\Be\Here\installation
l----        21/08/2024     13:56                  2088_1724241380002 󰁕 Z:\_fnm_\Nothing\Should\Be\Here\installation
l----        31/08/2024     19:28                  2140_1725125181392 󰁕 D:\EDM115\Programmes\fnm\node-versions\v22.7.0\installation
l----        20/08/2024     16:51                  2332_1724165513478 󰁕 Z:\_fnm_\Nothing\Should\Be\Here\installation
l----        27/08/2024     14:25                  2456_1724761541849 󰁕 Z:\_fnm_\Nothing\Should\Be\Here\installation
l----        27/08/2024     14:33                  2520_1724761997029 󰁕 Z:\_fnm_\Nothing\Should\Be\Here\installation
l----        21/08/2024     14:11                  2604_1724242289962 󰁕 Z:\_fnm_\Nothing\Should\Be\Here\installation
l----        20/08/2024     10:07                  2792_1724141003829 󰁕 Z:\_fnm_\Nothing\Should\Be\Here\installation
l----        24/08/2024     18:42                  2864_1724517776693 󰁕 Z:\_fnm_\Nothing\Should\Be\Here\installation
l----        20/08/2024     11:04                  2968_1724143914340 󰁕 Z:\_fnm_\Nothing\Should\Be\Here\installation
l----        27/08/2024     17:32                  298400_1724772770800 󰁕 Z:\_fnm_\Nothing\Should\Be\Here\installation
l----        24/08/2024     20:32                  299948_1724524372622 󰁕 Z:\_fnm_\Nothing\Should\Be\Here\installation
l----        28/08/2024     17:26                  3448_1724858774388 󰁕 D:\EDM115\Programmes\fnm\node-versions\v22.7.0\installation
l----        21/08/2024     15:07                  348_1724245625270 󰁕 Z:\_fnm_\Nothing\Should\Be\Here\installation
l----        21/08/2024     15:39                  3548_1724247557813 󰁕 Z:\_fnm_\Nothing\Should\Be\Here\installation
l----        28/08/2024     17:21                  3712_1724858369900 󰁕 D:\EDM115\Programmes\fnm\aliases\latest
l----        31/08/2024     19:24                  3824_1725125048642 󰁕 D:\EDM115\Programmes\fnm\node-versions\v22.7.0\installation
l----        25/08/2024     17:28                  3848_1724599692257 󰁕 Z:\_fnm_\Nothing\Should\Be\Here\installation
l----        24/08/2024     13:01                  3872_1724497288399 󰁕 Z:\_fnm_\Nothing\Should\Be\Here\installation
l----        21/08/2024     14:21                  3964_1724242880063 󰁕 Z:\_fnm_\Nothing\Should\Be\Here\installation
l----        20/08/2024     17:00                  4244_1724166038621 󰁕 Z:\_fnm_\Nothing\Should\Be\Here\installation
l----        21/08/2024     14:04                  4300_1724241871133 󰁕 Z:\_fnm_\Nothing\Should\Be\Here\installation
l----        28/08/2024     17:23                  4432_1724858628334 󰁕 D:\EDM115\Programmes\fnm\node-versions\v22.7.0\installation
l----        26/08/2024     16:13                  4572_1724681589399 󰁕 Z:\_fnm_\Nothing\Should\Be\Here\installation
l----        24/08/2024     13:01                  4632_1724497297854 󰁕 Z:\_fnm_\Nothing\Should\Be\Here\installation
l----        21/08/2024     14:04                  4820_1724241894880 󰁕 Z:\_fnm_\Nothing\Should\Be\Here\installation
l----        27/08/2024     12:39                  4872_1724752648883 󰁕 Z:\_fnm_\Nothing\Should\Be\Here\installation
l----        27/08/2024     18:31                  5016_1724776275165 󰁕 Z:\_fnm_\Nothing\Should\Be\Here\installation
l----        20/08/2024     11:28                  5096_1724146085370 󰁕 Z:\_fnm_\Nothing\Should\Be\Here\installation
l----        21/08/2024     15:08                  5148_1724245707901 󰁕 Z:\_fnm_\Nothing\Should\Be\Here\installation
l----        20/08/2024     10:09                  5248_1724141396352 󰁕 D:\EDM115\Programmes\fnm\node-versions\v20.16.0\installation
l----        26/08/2024     16:14                  5256_1724681651903 󰁕 Z:\_fnm_\Nothing\Should\Be\Here\installation
l----        25/08/2024     19:55                  5400_1724608555556 󰁕 Z:\_fnm_\Nothing\Should\Be\Here\installation
l----        27/08/2024     11:23                  5572_1724750527147 󰁕 Z:\_fnm_\Nothing\Should\Be\Here\installation
l----        20/08/2024     15:58                  5688_1724162292769 󰁕 Z:\_fnm_\Nothing\Should\Be\Here\installation
l----        24/08/2024     14:53                  5688_1724503981511 󰁕 Z:\_fnm_\Nothing\Should\Be\Here\installation
l----        27/08/2024     11:34                  5744_1724751239987 󰁕 Z:\_fnm_\Nothing\Should\Be\Here\installation
l----        31/08/2024     19:25                  5852_1725125150434 󰁕 D:\EDM115\Programmes\fnm\node-versions\v22.7.0\installation
l----        20/08/2024     17:08                  6256_1724166274518 󰁕 Z:\_fnm_\Nothing\Should\Be\Here\installation
l----        29/08/2024     08:29                  6500_1724912992460 󰁕 D:\EDM115\Programmes\fnm\node-versions\v22.7.0\installation
l----        31/08/2024     19:28                  6708_1725125281693 󰁕 D:\EDM115\Programmes\fnm\node-versions\v22.7.0\installation
l----        23/08/2024     20:03                  7192_1724436211895 󰁕 Z:\_fnm_\Nothing\Should\Be\Here\installation
l----        21/08/2024     14:33                  7396_1724243622873 󰁕 Z:\_fnm_\Nothing\Should\Be\Here\installation
l----        20/08/2024     11:06                  7412_1724144766164 󰁕 Z:\_fnm_\Nothing\Should\Be\Here\installation
l----        25/08/2024     11:35                  7424_1724578548959 󰁕 Z:\_fnm_\Nothing\Should\Be\Here\installation
l----        25/08/2024     11:39                  7584_1724578753557 󰁕 Z:\_fnm_\Nothing\Should\Be\Here\installation
l----        21/08/2024     15:03                  7644_1724245422560 󰁕 Z:\_fnm_\Nothing\Should\Be\Here\installation
l----        24/08/2024     08:55                  7724_1724482530127 󰁕 Z:\_fnm_\Nothing\Should\Be\Here\installation
l----        20/08/2024     15:20                  7856_1724159719007 󰁕 Z:\_fnm_\Nothing\Should\Be\Here\installation
l----        24/08/2024     14:20                  7912_1724502005290 󰁕 Z:\_fnm_\Nothing\Should\Be\Here\installation
l----        24/08/2024     14:20                  7916_1724502005152 󰁕 Z:\_fnm_\Nothing\Should\Be\Here\installation
l----        29/08/2024     02:46                  7964_1724892412766 󰁕 D:\EDM115\Programmes\fnm\node-versions\v22.7.0\installation
l----        27/08/2024     11:38                  7976_1724751493537 󰁕 Z:\_fnm_\Nothing\Should\Be\Here\installation
l----        25/08/2024     17:33                  8012_1724600034627 󰁕 Z:\_fnm_\Nothing\Should\Be\Here\installation
l----        24/08/2024     14:59                  8052_1724504173628 󰁕 Z:\_fnm_\Nothing\Should\Be\Here\installation
l----        20/08/2024     13:02                  8236_1724151733352 󰁕 Z:\_fnm_\Nothing\Should\Be\Here\installation
l----        27/08/2024     14:33                  8236_1724762038435 󰁕 Z:\_fnm_\Nothing\Should\Be\Here\installation
l----        20/08/2024     17:57                  8380_1724169438032 󰁕 Z:\_fnm_\Nothing\Should\Be\Here\installation
l----        20/08/2024     10:10                  8492_1724141417056 󰁕 Z:\_fnm_\Nothing\Should\Be\Here\installation
l----        23/08/2024     20:25                  8512_1724437510192 󰁕 Z:\_fnm_\Nothing\Should\Be\Here\installation
l----        26/08/2024     19:47                  8600_1724694465435 󰁕 Z:\_fnm_\Nothing\Should\Be\Here\installation
l----        27/08/2024     11:21                  8672_1724750319445 󰁕 Z:\_fnm_\Nothing\Should\Be\Here\installation
l----        24/08/2024     09:19                  8752_1724483993233 󰁕 Z:\_fnm_\Nothing\Should\Be\Here\installation
l----        25/08/2024     12:10                  8860_1724580637046 󰁕 Z:\_fnm_\Nothing\Should\Be\Here\installation
l----        23/08/2024     13:44                  9220_1724413498770 󰁕 Z:\_fnm_\Nothing\Should\Be\Here\installation
l----        21/08/2024     13:58                  9252_1724241528056 󰁕 Z:\_fnm_\Nothing\Should\Be\Here\installation
l----        20/08/2024     11:35                  9356_1724146553162 󰁕 Z:\_fnm_\Nothing\Should\Be\Here\installation
l----        29/08/2024     02:46                  936_1724892403614 󰁕 D:\EDM115\Programmes\fnm\node-versions\v22.7.0\installation
l----        26/08/2024     19:47                  9632_1724694447475 󰁕 Z:\_fnm_\Nothing\Should\Be\Here\installation
l----        23/08/2024     20:06                  9732_1724436360897 󰁕 Z:\_fnm_\Nothing\Should\Be\Here\installation
l----        25/08/2024     15:30                  9900_1724592632453 󰁕 Z:\_fnm_\Nothing\Should\Be\Here\installation

note how they point to a presumably inexistant folder.
and I believe that these junctions gets created only when fnm gets initialized from a powershell, and persists until shutdown of the pc
getting a consistent way of discovering them from UniGetUI might be hard, what do you think ?

EDM115 avatar Aug 31 '24 17:08 EDM115

still broken, and as far as i can tell all it would require to fix it is remove the hardcoded -NoProfile from the command args here: https://github.com/marticliment/UniGetUI/blob/4e5804c6532bfd3cd833d9ce4973b82e8142497d/src/UniGetUI.PackageEngine.Managers.Npm/Npm.cs#L40

however you are required to setup fnm in a specific way in order for it to work, for starters you need a powershell 5 profile file (see here for location and file name and what to save in it)

you'd also need to default a version of node in fnm with fnm default <version>

and that's it, you will notice that now when you open a powershell 5 window you have the defaulted node version working, and if that argument gets removed in the future (and if this is really the only thing keeping fnm from working, i should say i didn't bother with making the modification and compiling to test), UniGetUI should work too

TheSpartaPT avatar Apr 11 '25 14:04 TheSpartaPT

indeed, but what tells you that UniGetUI uses pwsh as a base executable ?
PowerShell 5/7 isn't installed by default on Windows machines, only PowerShell 2.0 is preinstalled and will work regardless of the machine (unless the user disabled himself the functionality)

EDM115 avatar Apr 11 '25 14:04 EDM115

@EDM115 afaik windows ships with powershell 5, you can verify with echo $PSVersionTable, at least win11 24H2 does, i just verified

also i know it uses powershell 5 and not 6 or 7 because you can see it right here, for the NPM manager Status.ExecutablePath is set here: https://github.com/marticliment/UniGetUI/blob/4e5804c6532bfd3cd833d9ce4973b82e8142497d/src/UniGetUI.PackageEngine.Managers.Npm/Npm.cs#L194

which results in the full command being this:

Image

TheSpartaPT avatar Apr 11 '25 15:04 TheSpartaPT

Yes, Windows 10 and 11 ship with Windows PowerShell 5.0 (and modern versions already ship with Windows PowerShell 5.1), so this shouln't be the problem

marticliment avatar Apr 11 '25 15:04 marticliment

@marticliment ok, my solution works to an extent, getting rid of -NoProfile made it so the commands start working, but the Found check done here https://github.com/marticliment/UniGetUI/blob/b1629a65ae38c51ab6a0fc0cfedbc103b9c31136/src/UniGetUI.PackageEngine.Managers.Npm/Npm.cs#L195 is still borking everything, so in order to test it i just hardcoded it to true and it works

Image

the problem with the Found check are the environment variables, it checks if npm exists by spawning a new process that runs where.exe npm, problem is this check doesn't take into account the powershell profile since it skips powershell entirely and runs where.exe directly, so fnm env which is inside the powershell profile never runs, and the necessary environment variables are never modified

see here for more info on fnm env

TheSpartaPT avatar Apr 11 '25 16:04 TheSpartaPT

@marticliment since #3703 doesn't resolve the FNM issue, i believe this issue should be reopened, or moved to a specific one
side note : it could allow to use other package managers which also have globally installed dependencies, like PNPM, Yarn, Deno or Bun

EDM115 avatar Jul 06 '25 12:07 EDM115

I don't like the idea of allowing custom paths supplied on UniGetUI, but I guess I can get UniGetUI to detect FNM and then have it show all the available npm installs

marticliment avatar Jul 06 '25 12:07 marticliment

i get it, hide it behind a Super Duper Hidden Advanced users Pro Max setting 🫣

EDM115 avatar Jul 06 '25 12:07 EDM115

That was the idea I had; I was going to add FNM paths to the detect list but I couldn't get FNM working, so could you provide the standard paths FNM installs Node to?

mrixner avatar Jul 06 '25 19:07 mrixner

@mrixner I can link you this I wrote : https://github.com/marticliment/UniGetUI/issues/2658#issuecomment-2322985299

I'll try to find tomorrow the default path

EDM115 avatar Jul 06 '25 19:07 EDM115

In theory, it should be as easy as modifying Npm.FindCandidateExecutableFiles() to also add those npm.ps1 files to the candidate executable list

marticliment avatar Jul 06 '25 21:07 marticliment

Yes, if there's a way to figure out which of the many directories in that list contains the executable.

mrixner avatar Jul 06 '25 21:07 mrixner