First try of Node.js

Spring Source has been advertising the scripted editor for a little while and I decided that I was going to give it a try.

First thing was to download an install Node.js itself.
Went to and downloaded the 64 bit linux tar ball.
Untarred in my /opt/ directory: tar zxvf node-v0.10.0-linux-x64.tar.gz

Once installed I could easily start node.js: /opt/node-v0.10.0-linux-x64/bin/node

Not much can be done with that but at least I know that it is running.

I copied the sample code from their documentation to an example.js

var http = require('http');

http.createServer(function (request, response) {
  response.writeHead(200, {'Content-Type': 'text/plain'});
  response.end('Hello Worldn');

console.log('Server running at');

And I can easily run this sample code: /opt/node-v0.10.0-linux-x64/bin/node example.js

Which gives you this output (at the command line): Server running at

Which gives you the “Hello World” web page when you open the link in your browser.

The real step is then to install scripted. It seems too easy from the Spring Source page since all you have to do is: npm install -g scripted

Did a lot of work but it currently ends with errors:

> scripted@0.4.0 postinstall /opt/node-v0.10.0-linux-x64/lib/node_modules/scripted
> cd client && bower install
throw new TypeError(‘Arguments to path.join must be strings’);
TypeError: Arguments to path.join must be strings
at path.js:360:15
at Array.filter (native)
at Object.exports.join (path.js:358:36)
at Object.<anonymous> (/opt/node-v0.10.0-linux-x64/lib/node_modules/scripted/node_modules/bower/lib/core/config.js:35:22)
at Module._compile (module.js:456:26)
at Object.Module._extensions..js (module.js:474:10)
at Module.load (module.js:356:32)
at Function.Module._load (module.js:312:12)
at Module.require (module.js:364:17)
at require (module.js:380:17)
npm ERR! scripted@0.4.0 postinstall: `cd client && bower install`
npm ERR! `sh “-c” “cd client && bower install”` failed with 8
npm ERR!
npm ERR! Failed at the scripted@0.4.0 postinstall script.
npm ERR! This is most likely a problem with the scripted package,
npm ERR! not with npm itself.
npm ERR! Tell the author that this fails on your system:
npm ERR! cd client && bower install
npm ERR! You can get their info via:
npm ERR! npm owner ls scripted
npm ERR! There is likely additional logging output above.

npm ERR! System Linux 3.7.3-101.fc17.x86_64
npm ERR! command “/opt/node-v0.10.0-linux-x64/bin/node” “/opt/node-v0.10.0-linux-x64/bin/npm” “install” “-g” “scripted”
npm ERR! cwd /home/mc
npm ERR! node -v v0.10.0
npm ERR! npm -v 1.2.14
npm ERR!
npm ERR! Additional logging details can be found in:
npm ERR! /home/mc/npm-debug.log
npm ERR! not ok code 0

I also tried downloading the scripted 0.4.0 zip file and the install gives the same errors. As the scripted site is recommending to use Node.js 0.8.6 it is obviously not working with the latest (0.10) yet.