You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
This version of macOS (10.11.6) is currently untested with this version of osa-imessage. Proceed with caution.
(node:644) UnhandledPromiseRejectionWarning: Error: Command failed: /usr/bin/osascript -l JavaScript
31:73: syntax error: Error on line 3: SyntaxError: Unexpected token '>' (-2700)
at ChildProcess.exithandler (child_process.js:275:12)
at emitTwo (events.js:126:13)
at ChildProcess.emit (events.js:214:7)
at maybeClose (internal/child_process.js:925:16)
at Socket.stream.socket.on (internal/child_process.js:346:11)
at emitOne (events.js:116:13)
at Socket.emit (events.js:211:7)
at Pipe._handle.close [as _onclose] (net.js:567:12)
(node:644) UnhandledPromiseRejectionWarning: Unhandled promise rejection. This error originated either by throwing inside of an async function without a catch block, or by rejecting a promise which was not handled with .catch(). (rejection id: 1)
(node:644) [DEP0018] DeprecationWarning: Unhandled promise rejections are deprecated. In the future, promise rejections that are not handled will terminate the Node.js process with a non-zero exit code
I am running Node v8.9.4 and OS X 10.11.6.
The text was updated successfully, but these errors were encountered:
To me, this looks like https://github.com/wtfaremyinitials/osa2/blob/master/index.js#L6 outputting ES6, which is presumably not supported by osascript. It looks like changing all the arrow functions to function () (and possibly changing all of the osa() functions to ES5) would fix it.
The module works as-is on macOS 10.13, so I guess ES6 was added to osascript recently. I like the babel solution; if you PR it I'd be more than happy to merge it.
When running this script:
I get this output in the terminal:
I am running Node v8.9.4 and OS X 10.11.6.
The text was updated successfully, but these errors were encountered: