Open joshuawagner opened 1 year ago
Hi Joshua - I quickly want to respond to let you know I've seen the issue - I'm a bit short on time at the moment but I hope I can be of help. My gut feeling is that it is a compatibility issue - I haven't updated the code in such a long time that it might no longer work with current node or jsx versions. I'l have to try it myself and will do that as soon as I find a minute.
In the meantime, can you tell me what NodeJS and Mac versions you are working on?
Thanks for your offer - I just setting up GitHub Sponsors (not active yet) and maybe that's a way, otherwise I am happy to give you my paypal address.
Sure, paypal is great.
I'm on MacOS 13.4.1 on an M1. I was on NodeJS 18.9.0 but I updated to the 18.6.1 (LTS) and I get the same errors.
Thanks - I hope I can have a look tonight. I've enabled GitHub Sponsoring, if that works for you, or my PayPal is c.boulanger@gmx.de ... Very much appreciated!
I tried it with v18.16.1 and v20.3.1 (the latest versions of v18 and v20 as provided by nvm
) and both worked. I am on MacOS 13.2.1 (Intel) I wonder if Apple Silicon might be a problem. Do you have an older Mac to try it on?
And maybe as a workaround, adapt line 378 like so:
if (e && e.message && e.message.includes("-1712")) {
Does this help?
When I enter that change VS Code gives me as a tooltip:
These are the errors that I get when I npm test
src/index.ts:105:7 - error TS18046: 'e' is of type 'unknown'.
105 e.lastJxaCmd = cmd;
~
src/index.ts:162:11 - error TS18046: 'e' is of type 'unknown'.
162 if (e.message.includes("-1728")) {
~
src/index.ts:313:11 - error TS18046: 'e' is of type 'unknown'.
313 if (e.message.includes("-1728")) {
~
src/index.ts:329:11 - error TS18046: 'e' is of type 'unknown'.
329 if (e.message.includes("-1728")) {
~
src/index.ts:378:24 - error TS2339: Property 'message' does not exist on type '{}'.
378 if (e && e.message && e.message.includes("-1712")) {
~~~~~~~
src/index.ts:378:37 - error TS2339: Property 'message' does not exist on type '{}'.
378 if (e && e.message && e.message.includes("-1712")) {
~~~~~~~
src/index.ts:380:15 - error TS2322: Type '{}' is not assignable to type 'string'.
380 error = e;
~~~~~
Here are the error indicators.
I'll start from the top:
Hi, I'm almost done with my dissertation! Thanks for your help over the years. Do you have a patreon or paypal so I can send a little appreciation your way?
I'm trying to get zotero-sync-bookends up and running again on my M1 mac after a while. I don't know what happened to my previous setup because the api key and bookends db name were both at default in my local repo. Anyways...starting over.
What I've done so far
reading through the readme and following instructions**
cd ../usr/bin/
export PATH=/Users/josh/node_modules:PATH
export PATH=/Users/josh/Documents/Bookends:$PATH
// not sure if this is necessary but I can't see how else it knows how to find the bookends dbcreated a new key in Zotero portal online
The following links are accessible:
edited lines 29 and 30 in
/Users/josh/node_modules/@cboulanger/zotero-sync-bookends/test.ts
zotero_api_key = "loremipsum";
bookends_db_name = "2022-09-21 bookends db";
install node packages
cd /Users/josh/node_modules/@cboulanger/zotero-sync-bookends
npm install
run!
npm test
Errors
I get 6 errors from /src/index.ts.
Index.ts
Here's the section of index.ts that I think it's referencing in the error: https://github.com/cboulanger/zotero-sync-bookends/blob/fea145e32ca1961bf226fc82b5c0b25ecf35a84f/src/index.ts#L349-L398