The wiring all looks fine to me - and you're sure it's a MCP23017 and not a MCP23S17 (the SPI one?).
You don't seem to have wired up the reset wire to A8 though - you could give that a try.
Other thing you could try is swapping var i2c=I2C2; to var i2c=new I2C(); - which will use software I2C instead of hardware. It shouldn't make a difference, but it's possible it would help.
Espruino is a JavaScript interpreter for low-power Microcontrollers. This site is both a support community for Espruino and a place to share what you are working on.
The wiring all looks fine to me - and you're sure it's a MCP23017 and not a MCP23S17 (the SPI one?).
You don't seem to have wired up the reset wire to A8 though - you could give that a try.
Other thing you could try is swapping
var i2c=I2C2;
tovar i2c=new I2C();
- which will use software I2C instead of hardware. It shouldn't make a difference, but it's possible it would help.