As NodeJS v0.4.0 is out, I thought I’d have a play around with it (something I haven’t done in a very long time!)
Instantly I ran into problems:
$ ./configure Traceback (most recent call last): File "/Users/greim/nodestuff/node/tools/waf-light", line 157, in import Scripting File "/Users/greim/nodestuff/node/tools/wafadmin/Scripting.py", line 146 except Utils.WafError, e: ^ SyntaxError: invalid syntax
I didn’t really want to remove Python 3 as I’d had dependency hell recently. Inspired by an answer on StackOverflow, I had a dig about in my /usr/bin directory to see if there was both Python v3 and Python v2 installed. Fortunately there was: /usr/bin/python2
Note: Following a comment by eveningsky below, there is a much easier way to work around the problem.
mkdir /tmp/bin ln -s /usr/bin/python2 /tmp/bin/python export PATH=/tmp/bin:$PATH
You can now carry on as normal. I have kept my nasty hack below just in case for some absurd reason the above doesn’t work for you.
Many thanks eveningsky!
After some trial and error, all I had to do was to edit 2 files:
amending the first line to read:
and once I had run ./configure edit the first line in the Makefile to read:
Now I have Node JS version 0.4.0 running on my Arch box.