squint

Jeremy 2025-03-05T19:26:45.605529Z

Hi all, Is it possible to use squint with node 12? I've been trying for the past couple of hours, but maybe I'm doing something wrong

borkdude 2025-03-05T20:37:18.885069Z

what's up with node 12?

borkdude 2025-03-05T20:39:08.121979Z

node 12 is end of life for years already, I recommend upgrading

Jeremy 2025-03-05T20:45:01.177329Z

I was using v20, but just found out the production server has v12 installed. It'll take ages before we get approval to upgrade, and deployment is due this week.

borkdude 2025-03-05T20:50:51.318329Z

What error do you get with 12 then

Jeremy 2025-03-05T20:57:45.175349Z

$ npx squint watch
file:///C:/home/.../project/node_modules/squint-cljs/src/squint/core.js:1495
      return conj(args[0] ?? [], ...iterable(args[1]));
                           ^

SyntaxError: Unexpected token '?'
    at Loader.moduleStrategy (internal/modules/esm/translators.js:140:18)
The null coalescing operator

borkdude 2025-03-05T20:58:49.956759Z

Can you try to patch that in your local node modules ?

Jeremy 2025-03-05T21:34:48.026999Z

alright

Cora (she/her) 2025-03-05T21:45:35.082119Z

i'll bet babel can transpile it to be compatible with node 12

👍 1
borkdude 2025-03-05T21:53:47.688929Z

sure I could also do it manually but if Jeremy could try it in their node_modules, it's easier to find out of that's the only thing

👍 1
Cora (she/her) 2025-03-05T21:57:27.126459Z

totally fair

Jeremy 2025-03-05T21:59:20.134789Z

I'll try it out early tomorrow cause it's late now.

Jeremy 2025-03-06T17:11:13.654499Z

yes, babel worked

🎉 2