Every time MacBook Pro, uses the command line to manipulate the file, it will report an error permission denied.

MacBook Pro, will report an error permission denied every time I use the command line operation file, and then I can only sudo-s every time. I ask for a password every time I edit the file pulled down by the scaffolding and ask for a solution urgently.

Mar.18,2021

it is recommended to check the permissions of the upper directory


reason is usr/local/lib/node_modules is root permission,
solution: enter the command

in usr/local/lib
sudo chown -R  ./node_modules
Menu