Streamstatus undefined error using simple example

When trying Plotly (via node.js) I get the following output:

{ streamstatus: undefined,
url: ‘https://plot.ly/~littlepunk/9’,
message: ‘’,
warning: ‘’,
filename: ‘simple-node-example’,
error: ‘’ }

from this sample code copied from the Plotly site. My username/apikey seems to work ok (obviously edited below)

var plotly = require(‘plotly’)(“myusername”, “myapikey”);
var data = [{x:[0,1,2], y:[3,2,1], type: ‘bar’}];
var layout = {fileopt : “overwrite”, filename : “simple-node-example”};

plotly.plot(data, layout, function (err, msg) {
if (err) return console.log(err);
console.log(msg);
});

There is no output file generated. Any ideas? Google turned up nothing I could find. Stuck at the starting line.
Using Ploty.js 1.0.6 and Node.js v 6.11.0.

Cheers!

That’s the intended behavior, plotly.plot creates a graph hosted on plot.ly. The msg object should include the graph’s URL.

To save an image of the graph, see GitHub - plotly/plotly-nodejs: node.js wrapper for Plotly's Chart Studio Streaming and REST APIs