projectile icon indicating copy to clipboard operation
projectile copied to clipboard

When using projectile with the npm config I get npm command not found

Open suityou01 opened this issue 1 year ago • 4 comments

Expected behavior

npm commands execute correctly

Actual behavior

npm start
zsh:1: command not found: npm

Steps to reproduce the problem

Configure your default shell to zsh Install projectile Add config for npm from the projectile documentation Open an npm project inside emacs using C-p p Try and run the project using C-p u

Environment & Version information

Arch Node v20.17.0 Nvm 0.40.1 zsh 5.9

Projectile version information

Projectile 20240901.1554

Emacs version

29.4

Operating system

Arch

suityou01 avatar Oct 01 '24 11:10 suityou01

Likely you're Emacs's exec-path is not properly configured. Using a package like https://github.com/purcell/exec-path-from-shell will probably solve this issue for you.

bbatsov avatar Oct 02 '24 05:10 bbatsov

That didn't fix it sadly. I noticed that if I run an eshell I get the problem, but with shell I don't. Does this help narrow it down? What mode does the compilation window use?

suityou01 avatar Oct 02 '24 17:10 suityou01

This issue has been automatically marked as stale because it has not had any recent activity. It will be closed soon if no further activity occurs. Thank you for your contribution and understanding!

github-actions[bot] avatar Jan 19 '25 02:01 github-actions[bot]

@suityou01 The problem is not related to the mode, but rather to the ability of Emacs to see something on its own version of the PATH. That's why I thought the package I suggested should help, but perhaps you'll have to set exec-path manually in Emacs.

bbatsov avatar Jan 30 '25 07:01 bbatsov