What version of Node are you using? On node v4.2.0 I get that exact error when publishing or previewing courses that contain a graphic.
The authoring tool supports node v0.10.33 at the moment, could you install this version of node and try again?
I use node version manager (nvm) to change version of node. We are looking to support node v4.2.0 soon.