0

I have a dependencies list of nearly 40 node modules and while I was able to install all of them using one (or two) commands-

npm install module-1 module-2 ... module-N --save-dev

-still looking for a way to create a file that installs all dependencies when executed. This way anyone could download a single file for his/her system (Mac / Linux in my case) and install all modules by simply running that file. Any great suggestion, method? Thanks a lot!

1 Answer 1

1

npm init will create a package.json for you. Within that file you can list your app's dependencies and dev dependencies like this:

{
    ...
    "dependencies": {
        "express": "^4.9.7"
    },
    "devDependencies": {
        "mocha": "^2.0.1"
    }
}

Then npm install

Sign up to request clarification or add additional context in comments.

2 Comments

Thanks @Andrew, figured out what was wrong, sudo npm install
And gyp fails with node v0.12.2 :( but at least you put me back in the right direction. Thanks again!

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.