apple-notes-jxa icon indicating copy to clipboard operation
apple-notes-jxa copied to clipboard

execution error: Error: Error: Can't convert types. (-1700)

Open bloatfan opened this issue 4 years ago • 1 comments

hi、i use this demo、report error

my os:

catalina: 10.15.4

code

const Notes = require('apple-notes-jxa');

Notes.accounts()
  .then((accounts) => console.log(accounts));

error

image

please help me, thank you!

bloatfan avatar Aug 16 '20 15:08 bloatfan

I'm not sure if this is the cause of the above (the "Can't convert types" just comes up in every context when things go wrong) but I found that if you refer to Application("Notes") now you actually get the widget extension instead of the app. You have to use Application("com.apple.Notes").

patniemeyer avatar Nov 05 '21 13:11 patniemeyer