Running the project on linux server produces error EACCES


#1

Hi There,
I built the project in a windows machine. But when I try to run it on a linux machine it gives the error 'spawn EACCES. The same project runs flawlessly on the windows machine.

Here’s the exact error:

I tried running the app with sudo npm start and it gives out another error and the app doesn’t even start
Here’s the error after running with sudo

It would be awesome if you could help me with this.

Thank you !


#2

I think that’s access-rights administrative issue.
You could check that by running app as a superuser (which isn’t recommended in production).


#3

Hey @alex,
As I said I tried running the app with sudo as well but it gives another error shared above.


#4

It seems destructuring is failing. Are you sure you are using at least node 8.x?


#5

Yes I am using node 8.1 but it might be the case that Linux is using some other version when run with sudo


#6

You can check that by running sudo node -v, right?


#7

@alex Yes I did and figured that the versions were different.Thank you.