Since you clearly have npm and this is happening in a directory with a package.json, I recommend familiarizing yourself with npm-run-all(run-s, run-p), or equivalent, then you won't be tied to bash (can run on windows without bash installed, for example).
Also, there's pretty much no reason any of these commands should require sudo, and especially the npm ones are wildly unsafe. update can run arbitrary installation lifecycle scripts from unknown parties, and run well... runs the actual code of the dependencies in accordance with how your scripts call it. If this doesn't work without sudo in your case, you should probably fix the file permissions instead of giving superuser access to these already insecure tools.
Finally, you said "every time when I pull from the repository". These is a small chance you might be interested in git hooks, eg through git-hooks-js or husky
I've been a professional C, Perl, PHP and Python developer.
I'm an ex-sysadmin from the late 20th century.
These days I do more Javascript and CSS and whatnot, and promote UX and accessibility.
Since you clearly have
npm
and this is happening in a directory with apackage.json
, I recommend familiarizing yourself with npm-run-all(run-s
,run-p
), or equivalent, then you won't be tied to bash (can run on windows without bash installed, for example).Also, there's pretty much no reason any of these commands should require
sudo
, and especially thenpm
ones are wildly unsafe.update
can run arbitrary installation lifecycle scripts from unknown parties, andrun
well... runs the actual code of the dependencies in accordance with how your scripts call it. If this doesn't work withoutsudo
in your case, you should probably fix the file permissions instead of giving superuser access to these already insecure tools.Finally, you said "every time when I pull from the repository". These is a small chance you might be interested in git hooks, eg through git-hooks-js or husky
Thanks Mihail Malo
when I run
npm update
I got this error :`
Wow, what an amazing error!
Good job, npm developers!
It tells you WHY this happened, and also tells you the correct way to fix it!
It's also very unlikely you want to run
git pull
every time you pull, because that would never end...lmao