Killertechno
Posts: 177
Joined: Wed Jan 02, 2013 8:28 am

[newbie] How install npm?

Fri Dec 21, 2018 7:18 pm

Hi to all, I know this cuold be a stupid question but I'm totally noob about this....

I have a server I can supply seismic data (Raspberry at 127.0.0.1), I want display realtime data on webpage following this example:

http://www.seis.sc.edu/~crotwell/seispl ... dlink.html

My target is a webpage to display realtime data in local server, without internet connection.
(if someone knows better solution it'll be apreciated)

I followed (I tried) instructions here:
https://github.com/crotwell/seisplotjs-seedlink

I placed all files in my folder (http://www.seis.sc.edu/~crotwell/seispl ... /realtime/) so I can see webpage seedlink.html using apache or lighttpd.

Now I don't know what I did (I installed several packages): at the beginning it was correctly working, then it stopped to work.
Then I used new installations (Ubuntu 16.04, Raspberry Pi and Raspberry Pi on virtual machine): I can't make it working.

Obvoiusly running different programs (telnet, SeisGram2K) I can correctly connecto to server and download data.

May someone help me and drive my through installation step by step? It looks so simple but I don't understand...
Thanks.

PhatFil
Posts: 1367
Joined: Thu Apr 13, 2017 3:55 pm
Location: Oxford UK

Re: [newbie] How install npm?

Fri Dec 21, 2018 9:47 pm

use the cli command

Code: Select all

history >> yourfilename.txt
to put your command history into a text file you can edit to keep only relevant entries and review for errors or list here for more detailed help.

I found a hassle free npm install of the latest version was bundled into the install script for node red found on the pi page of Nodered.org..
just dont start node red unless of course you want to ;)

beyond that im probably not much help..

Heater
Posts: 13291
Joined: Tue Jul 17, 2012 3:02 pm

Re: [newbie] How install npm?

Mon Dec 24, 2018 5:21 am

The seisplotjs-seedlink install instructions are clear enough.

Except they don't say what you need to install before you start. The project dependencies.

Clearly you need npm.

npm comes with node.js. If you install node.js you will have npm as well.

node.js can be installed from a Raspbian package using "sudo apt-get install node.js" (Sorry that might not be the exact package name, I never do that)

I like to install node.js with the node version manager, nvm, see instructions here: https://github.com/creationix/nvm

Using nvm it is very easy to update node to the latest release or revert to some older release if something breaks or have multiple node versions in use at the same time if you have different projects that demand different versions of node.

Return to “Other programming languages”