npm equivalent of `pip install -r requirements.txt`

Normally dependencies in a node project are installed via package.json: https://docs.npmjs.com/files/package.json

You install each dependency with npm install --save my-dependency and it will be added to the package.json file. So the next person on the project can install all the dependencies with npm install command on the same folder of package.json.

But in my case i wanted to install global requirements of npm via a text file (similar to pip install -r requirements.txt).

You can do that with:

cat requirements.txt | xargs npm install -g

Leave a Comment

Hata!: SQLSTATE[HY000] [1045] Access denied for user 'divattrend_liink'@'localhost' (using password: YES)