openwork icon indicating copy to clipboard operation
openwork copied to clipboard

[Bug]: Executable not found in $PATH: "npx"

Open Heltman opened this issue 8 months ago • 9 comments

Summary

Image Image

Steps to reproduce

mac mini m4

install cann't use chrome-devtools, but npx is avaliable

Expected behavior

use chrome-devtools

Actual behavior

cannot use chrome-devtools

Heltman avatar Mar 17 '26 02:03 Heltman

is this a fresh install?

benjaminshafii avatar Mar 17 '26 02:03 benjaminshafii

is this a fresh install?

Yes, Fresh install in MacOS

Heltman avatar Mar 17 '26 06:03 Heltman

At some point recently I also got to this error although it worked before

shepitchakpavlo avatar Mar 18 '26 14:03 shepitchakpavlo

Workaround:

Symlink your npx and node binaries to /opt/homebrew/bin, which macOS GUI apps already include in their default PATH:

Find your node/npx location first

which npx# e.g., /Users/YOU/.nvm/versions/node/v20.10.0/bin/npx

Create symlinks (replace with your actual path)

ln -sf /Users/YOU/.nvm/versions/node/v20.10.0/bin/npx /opt/homebrew/bin/npx ln -sf /Users/YOU/.nvm/versions/node/v20.10.0/bin/node /opt/homebrew/bin/node For NVM users, youcan find the path with: echo$NVM_BIN

Or

ls ~/.nvm/versions/node/ For Volta users: ls ~/.volta/bin/ ln -sf ~/.volta/bin/npx /opt/homebrew/bin/npx ln -sf ~/.volta/bin/node /opt/homebrew/bin/node For Bun users: ln -sf ~/.bun/bin/npx /opt/homebrew/bin/npx ln -sf ~/.bun/bin/node /opt/homebrew/bin/node

shepitchakpavlo avatar Mar 18 '26 14:03 shepitchakpavlo

@shepitchakpavlo I install node through brew

Image

Heltman avatar Mar 19 '26 02:03 Heltman

Assigning @OmarMcAdam. This may be related to the Chrome / npm startup path, so please investigate whether we can fix this without depending on npx being present.

benjaminshafii avatar Mar 22 '26 18:03 benjaminshafii

Rechecking this during the current bug pass: current dev already has explicit GUI-PATH compensation for desktop-launched tools (including Homebrew, nvm, volta, bun, and common npm locations) in pps/desktop/src-tauri/src/paths.rs.\n\nBefore changing code here, it would be good to retest on the latest build/dev to confirm whether this still reproduces on current macOS builds.

pascalandr avatar Apr 22 '26 05:04 pascalandr

Same issue, interestingly enough, both on MacOS and on Linux. Also before it worked. Image

npx

Entering npm script environment at location:
/Users/username
Type 'exit' or ^D when finished

sh-3.2$ exit

AIWintermuteAI avatar May 05 '26 14:05 AIWintermuteAI

this should be solved by #1652 - check after next release and report back if not resolved

src-opn avatar May 05 '26 16:05 src-opn