Be part of JetBrains PHPverse 2026 on June 9 – a free online event bringing PHP devs worldwide together.

CrastyCrap's avatar

Npm run dev get error on shared host

Greeting everyone I am trying to install node modules on my Laravel application on shared host i install NodeJS and npm on the host then I went to the project and run the following command npm install and it run successfully but when I run npm run dev I got the following error

npm ERR! code EAGAIN
npm ERR! syscall spawn sh
npm ERR! path /home2/sonamakt/public_html/marketsonamak
npm ERR! errno -11
npm ERR! spawn sh EAGAIN
npm ERR! command sh -c mix

npm ERR! A complete log of this run can be found in:
npm ERR!     /home2/sonamakt/.npm/_logs/2022-04-19T08_02_49_176Z-debug-0.log
0 likes
5 replies
sr57's avatar

@crastycrap

does /home2/sonamakt/public_html/marketsonamak exist? is readable? (pb of rights)

sr57's avatar

Probably you don't have access to sh command on shared host

Run the command in local and sync your files in the server.

CrastyCrap's avatar

@sr57 no i am able to use ssh and i used it to install npm but when i run npm run dev i got that error

sr57's avatar

@crastycrap

Good to have full access to your server.

I should try to reinstall npm

npm cache clean --force && rm -rf node_modules && rm ./package-lock.json && npm install

Please or to participate in this conversation.