1

I'm trying to run an Angular application on Linux Virtual Machine using:

npm start

However, it says:

> application@1.28.2-rc-retail.2 start
> nx serve

sh: 1: nx: Permission denied

(that's it, nothing else)

According to this stackoverflow post, I should try:

npm config set user 0
npm config set unsafe-perm true

However, it outputs:

npm ERR! code EUSAGE

Full output:

enter image description here

There's not much stackoverflow post regarding just "sh: 1: nx: Permission denied". Other people's errors are more descriptive than in my situation.

Why am I getting this error and how do I solve it? I would appreciate your knowledge and experience in this subject, thanks.

HeyLameRobin
  • 159
  • 1
  • 3
  • 12

1 Answers1

0

I think you might get this under two conditions:

  1. You didn't run the command from the directory where node_modules is installed (maybe one level up)
  2. You don't have nx installed globally - you could try with npx nx serve instead
William Neely
  • 1,923
  • 1
  • 20
  • 23