petervandijck's avatar

Herd: brand new laptop install, no node or vite?

On a brand new macbook, I installed Herd.

When I run which npm, it says npm not found.

I go to Herd and install Node. Doesn't make a difference. I go to the npm website and install npm. Then I do npm run dev in a laravel project, and I get sh: vite: command not found

Isnt Herd supposed to install all these things? Should I install Vite manually?

1 like
6 replies
petervandijck's avatar

Still struggling with this brand new install. Herd apparently didn't install npm and vite correctly. Any tips?

1 like
Adam_S's avatar

I have the same problem. I installed Herd on a Mac and am trying to go through the Laravel Bootcamp > Chirper With Livewire. I get to the "npm run dev" step and get "zsh: command not found: npm".

I too thought Herd would take care of all of this. Did you ever get it working?

1 like
click's avatar

@Adam_S NPM is something you have to install yourself on your machine. Node is included in Herd but NPM (the package manager) is not.

Adam_S's avatar

@click Thank you. It looks like I also needed to manually install vite.

martinbean's avatar

This is why I prefer Docker. I have aliases for things like php, composer, npm etc that just run the requested command in a Docker image.

Did this when I get a new M2 MacBook Pro when they were released last spring and have still avoided installing PHP etc on the machine itself.

Please or to participate in this conversation.