Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

/usr/bin/env: node: Permission denied

As the title suggests I am receiving the error

/usr/bin/env: node: Permission denied

when trying to run

npm run build

for my react app. The following link is the leadup to this point with all that I've done and tried, not to be included here for the sake of not duplicating questions Error with react-scripts in npm run build.

Additionally, I have viewed this post, Getting Error /usr/bin/env: node : Permission Denied, and it was unhelpful to me.

like image 565
ABadOmelette Avatar asked Dec 14 '25 11:12

ABadOmelette


1 Answers

I was working in a dockerized node environment and noticed that the mounted source code directory had different ownership (running the container as root) from host environment. Changing the ownership using:

chown -R root:root .

made the error go away for me!

like image 165
Raaka Avatar answered Dec 17 '25 02:12

Raaka