You are not logged in.

#1 2014-10-09 20:51:07

Box0
Member
From: Italy
Registered: 2011-09-21
Posts: 218

d3js installed through npm doesn't work

I installed nodejs from [community], then used

npm -g install d3 --python=/usr/bin/python2

to install d3js.  It seems everything works fine and I see a d3 folder in "/usr/lib/node_modules/"

According to the d3js site, at this point I should run a local web server using

python2 -m SimpleHTTPServer 8888 &

(or the python3 equivalent).

The server runs, but when I use any browser to go to http://localhost:8888/ I only get a list of files (those installed into "/usr/lib/node_modules/d3") but I have no idea how to run the examples. When I click on any .js file I see the source code instead of running it.

What am I doing wrong?

Offline

#2 2014-10-09 21:36:33

Box0
Member
From: Italy
Registered: 2011-09-21
Posts: 218

Re: d3js installed through npm doesn't work

nevermind, solved it. It was me being very stupid. I didn't notice there were no example in the npm package and that I had to download them manually. Sorry for the noise.

Offline

Board footer

Powered by FluxBB