How can I install node.js module using phantom, instead of npm?

How to install a node.js module without using npm?

  • There are quite a few modules which are listed https://github.com/joyent/node/wiki/modules but are not published with the npm-registry. These modules can't be installed using npm. What is the correct way to install these nodejs modules after cloning them from Git?

  • Answer:

    You need to download their source from the github. Find the main file and then include it in your main file. An example of this can be found here > http://stackoverflow.com/questions/5778474/uploaing-file-in-node-js/5780829#5780829 Usually you need to find the source and go through the package.json file. There you can find which is the main file. So that you can include that in your application. To include example.js in your app. Copy it in your application folder and append this on the top of your main js file. var moduleName = require("path/to/example.js")

vivekian2 at Stack Overflow Visit the source

Was this solution helpful to you?

Related Q & A:

Just Added Q & A:

Find solution

For every problem there is a solution! Proved by Solucija.

  • Got an issue and looking for advice?

  • Ask Solucija to search every corner of the Web for help.

  • Get workable solutions and helpful tips in a moment.

Just ask Solucija about an issue you face and immediately get a list of ready solutions, answers and tips from other Internet users. We always provide the most suitable and complete answer to your question at the top, along with a few good alternatives below.