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

How do I install this NPM module for use in a HTA?

Sergio Daniel Xalambrí at Quora Visit the source

Was this solution helpful to you?

Other answers

First install http://nodejs.org/. NPM comes packed with NodeJS. Open a command prompt in the directory you are working in. (Windows: Keep the SHITF key presses and right click in folder, select command prompt.) Then run the command npm install hta-localstorage. You should have a node_modules folder in that directory.

Moin Uddin

It's standalone module that will be included into your other nodejs application. And it will be use  when the user come into your application using IE9 which does not support localstorage.

Canh Nguyen

Since this npm module is for the browser, it's meant for use with . This is used for the HTML Application (HTA) because a browser engine is used to run the code and render the content. Then you'll need to require the module from inside your browser-side JavaScript code. How it works:

Miguel Paraz

It depends on where you are going to use the lib. If you use it on the server side, you need to do the following: Install Node.js and the npm will be installed as well. Go to http://npmjs.org andsearch for the lib to make sure it has been published there. Find the version of the lib from http://npmjs.org In your project folder, open package.json, if it doesn't exist, create one with your text editor tool. Add the lib and version to the package.json. You can Google package.json format  easily. Then, open command/terminal and switch to your project location, where the package.json locates and run: npm install.

James Ye

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.