I'm writing my first Azure Function in Node. This is in VS Code on my local machine. I'm requiring some js code I'd written for a Chrome extension but it's not compiling. For instance, this spread operator
if (otherProps) this.props[indx] = {
...this.props[indx],
...otherProps
};
Generates the following error:
...this.props[indx], ^^^ SyntaxError: Unexpected token ... at createScript (vm.js:56:10) at Object.runInThisContext (vm.js:97:10)
node.green shows full compatability for spread at node 8.6, Azure v1 is 8.11, so I don't think it's that.
Have I missed something simple here? Of note, I'm getting all sorts of errors with most of the node packages I tried to require. Spread operators, replace, nodeType all failed.