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

BugHunters's avatar

sh: 1: cross-env: Permission denied

When i try to run "npm run watch" it provided

sh: 1: cross-env: Permission denied

any ideas?

0 likes
4 replies
yottabit.at's avatar

Try to run npm rebuild, for me it fixes the problem...

20 likes
COTIGA's avatar

On ubuntu server

First

sudo chown -R $USER /usr/local

And

cd /path/of/project

chmod -R a+x node_modules

npm run watch

If not work

npm rebuild

npm run watch

If not work

rm -Rf node_modules

npm install

npm run watch

Please or to participate in this conversation.