Not sure if this will help, but in the following this file: http://cocos2djs.org/demos/tile-maps I found this construct:
var map = new TMXTiledMap({ file: path.join(__dirname, '../resources/TileMaps/iso-test.tmx') })
var map = new TMXTiledMap(
{ file: path.join(__dirname, '../resources/TileMaps/iso-test.tmx')})
theThe github site also has tutorials on using javascript for cocos2d