Description
When installing a tool from the marketplace, the installation fails with:
Error invoking remote method 'install-tool': Error: No package manager found. Please install pnpm or npm globally
This happens even though npm is installed globally via nvm and works correctly in the terminal.
Root Cause
On macOS, GUI apps launched from Dock or Finder don't inherit the user's shell PATH. They only see the default system PATH (/usr/bin:/bin:/usr/sbin:/sbin), which doesn't include paths like /usr/local/bin or ~/.nvm/versions/node/*/bin.
This means the app can't find npm or pnpm even when they're properly installed.
Workaround: Launching PPTB from the terminal via open "/Applications/Power Platform ToolBox.app" works because it inherits the shell PATH.
Suggested Fix
Use the fix-path package to patch process.env.PATH at app startup. This is the standard solution for this problem in Electron apps — it reads the user's actual shell PATH by running a login shell:
import fixPath from 'fix-path';
fixPath();
This should be called early in the main process before any child processes are spawned.
Environment
- OS: macOS 15 (Sequoia)
- Node: v24.14.0 (installed via nvm)
- npm: 11.12.1
- PPTB: latest version
Description
When installing a tool from the marketplace, the installation fails with:
This happens even though
npmis installed globally vianvmand works correctly in the terminal.Root Cause
On macOS, GUI apps launched from Dock or Finder don't inherit the user's shell
PATH. They only see the default system PATH (/usr/bin:/bin:/usr/sbin:/sbin), which doesn't include paths like/usr/local/binor~/.nvm/versions/node/*/bin.This means the app can't find
npmorpnpmeven when they're properly installed.Workaround: Launching PPTB from the terminal via
open "/Applications/Power Platform ToolBox.app"works because it inherits the shell PATH.Suggested Fix
Use the
fix-pathpackage to patchprocess.env.PATHat app startup. This is the standard solution for this problem in Electron apps — it reads the user's actual shell PATH by running a login shell:This should be called early in the main process before any child processes are spawned.
Environment