How to Resolve Syntax Errors While Upgrading from v1 to v2 in Node.js When Using Temp File Storage?

This topic was automatically generated from Slack. You can find the original thread here.

Syntax Question re upgrading from v1 to v2
I’m trying to use temp file storage.
In v1 its no problem.
In v2 I’m trying to use the same node.js code and getting syntax errors. I’ve really tried to research it, but getting stuck. I figure this must be basic stuff, but I couldn’t easily find nodejs samples in the docs anywhere.
The error appears to be on the promisify include…
This is what I see.
Any advice? (edited)

take a look at these examples and try chatting our Pi bot (now in the workflow UI) with your code and it’ll be able to help