Reputation: 675
I'm new to node.js, I would like to use Step.js
https://github.com/creationix/step
The install instructions are very simple:
"Simply copy or link the lib/step.js file into your $HOME/.node_libraries folder."
The problem is that I can't find the .node_libraries folder anywhere. I tried to create the folder myself and upload the step.js file but I get the following error:
ReferenceError: Step is not defined
I tried to create the following directories:
but none of them works.
Also, Is it possible to load Step as a module?
Thankyou
Upvotes: 2
Views: 571
Reputation: 6371
They have an npm module.
Simply run npm install --save step
in the same dir your package.json
resides and then you can require()
it in your code like this:
var Step = require('step');
Upvotes: 3
Reputation: 337
The documentation is outdated. you should use the node package manager.
open the command line in the folder and write:
npm install step
also remember to include the module in your javascript file:
var Step = require('step');
Upvotes: 1