sarahghp / p5bots

Use your microcontroller with p5.js
GNU Lesser General Public License v2.1
199 stars 45 forks source link

p5bots-server will not install #5

Closed limzykenneth closed 9 years ago

limzykenneth commented 9 years ago

Hi, I was not able to install p5bots-server via npm despite trying to install v0.1.0, v0.0.2 or directly installing via github. Briefly looking at the bunch of error messages npm throws it seems that the problem lies with the serialport package. What should I do?

Thanks.

sarahghp commented 9 years ago

Hi @limzykenneth,

I'm sorry you are having trouble. Have you looked at the serialport documentation to see if it addresses your errors?

sarahghp commented 9 years ago

I'm going to go ahead and close this up; if you can pin down a p5bots issue, we can reopen.

limzykenneth commented 9 years ago

Hi, sorry for the late reply, I was a bit tied up the past few days and wasn't able to reply.

I have looked at the serialport documentation and I seem to have the required tools already installed, ie xcode command line tool.

I solved the problem by cloning the p5bots repo and manually copy the p5bots-server into node_modules while also changing serialport dependency from ^1.7.4 to ^2.0.0. I'm not entirely sure why the 1.7.4 version won't install but the 2.0.0 will but I would suggest updating it and as far as I can tell there isn't any breaking changes for p5bots. I might be wrong though so you might want to have a look.

limzykenneth commented 9 years ago

@sarahgp Hi, I spent some time digging in the serialport repo and come up with the problem here.

That's quite a long thread but in short, node 4.x does not work with NAN v2 and in turn serialport v1.7.4, they updated serialport to use NAN v2 to be compatible with node 4.x and so bumped serialport to v2. Which means that anyone using node 4.x needs to use serialport v2 or it won't install.