0

I am trying to start my nx framework application but i couldn;t getting an error

NX EACCES: permission denied, open '/Users/hariharan.ravichandran/.config/fork-ts-checkerrc'

Pass --verbose to see the stacktrace.

————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————

NX Running target serve for project host-shell failed

Failed tasks:

  • host-shell:serve:development

Hint: run the command with --verbose for more details.

every time when i start i get this error looks like a permission error

harry
  • 11
  • 2
  • did you try to follow the instructions and run it with the `--verbose` flag? – Matthias Apr 18 '23 at 12:17
  • its just showing the same error with more of an informationnpm timing npm:load:configScope Completed in 0ms npm timing npm:load Completed in 51ms (⠂⠂⠂⠂⠂⠂⠂⠂⠂⠂⠂⠂⠂⠂⠂⠂⠂⠂) ⠴ : timing npm:load Completed in 94ms > nx run administrative-profile:build:development > NX EACCES: permission denied, open '/Users/hariharan.ravichandran/.config/fork-ts-checkerrc' Pass --verbose to see the stacktrace. (⠂⠂⠂⠂⠂⠂⠂⠂⠂⠂⠂⠂⠂⠂⠂⠂⠂⠂) ⠴ : timing npm:load Completed in 94ms ———————————————————————————————————————————————————————————————————————————————————————————————————————————— – harry Apr 25 '23 at 17:58
  • please put the full error message as text in your question. Also, the error is about permissions, did you make sure the user running the script has read/write access to that file mentioned there? – Matthias Apr 26 '23 at 09:24

1 Answers1

0

I suspect it's an ownership issue with the files in your project node_modules.

Try these steps in console:

  1. check who is your current user (say the result reads hariharan):
whoami
  1. go to the root folder of your project (usually, the one containing node_modules) and run this command to see who is the owner of node_modules contents:
ls -al ./node_modules

I expect the result will go sth along the line of (the root suggests the owner is root and you need to change it to your user from step-1:

drwxr-xr-x     3 root  staff       96 Oct 12  2022 some-file-or-folder-name
  1. Change ownership from root --> hariharan for all files and folders recursively (-R) with this command:
sudo chown -R hariharan: ./
  1. Try re-run your nx command
zaggi
  • 870
  • 1
  • 7
  • 24