Ansis Māliņš
Ansis Māliņš

Reputation: 1704

How do I run a node.js app that I installed with npm?

So I installed Node.js on my Windows machine, opened up command prompt and typed

npm ethercalc

Lots of lines flew by and it seems ethercalc and its dependencies have been downloaded and installed. Now, how do I run ethercalc?

node ethercalc

returns a message saying it can't find file "ethercalc" in the current directory.

Note: I'm completely new to node.js. I was very surprised that the official website does not contain basic "Getting Started" info.

Upvotes: 0

Views: 1642

Answers (1)

go-oleg
go-oleg

Reputation: 19480

Since ethercalc is an executable, you should install it globally using :

npm install -g ethercalc

and then you can run it using:

ethercalc

Note, you will probably need to use sudo for the install if you are on linux.

Alternatively, their website also mentions installing locally and running the executable from the node_modules folder:

npm install ethercalc
./node_modules/ethercalc/bin/ethercalc

Upvotes: 3

Related Questions