Fork me on GitHub
#squint
<
2023-06-11
>
seancorfield20:06:28

Decided to try out squint today. Followed the README instructions but I get Unexpected string from any attempt to run it -- details in ๐Ÿงต

seancorfield20:06:00

(~/clojure)-(!2023)-> mkdir squint-test && cd squint-test

Sun Jun 11 13:36:54
(~/clojure/squint-test)-(!2024)-> npm init -y
Wrote to /home/sean/clojure/squint-test/package.json:

{
  "name": "squint-test",
  "version": "1.0.0",
  "description": "",
  "main": "index.js",
  "scripts": {
    "test": "echo \"Error: no test specified\" && exit 1"
  },
  "keywords": [],
  "author": "",
  "license": "ISC"
}



Sun Jun 11 13:36:59
(~/clojure/squint-test)-(!2025)-> npm install squint-cljs@latest
npm notice created a lockfile as package-lock.json. You should commit this file.
npm WARN [email protected] No description
npm WARN [email protected] No repository field.

+ [email protected]
added 1 package and audited 1 package in 0.176s
found 0 vulnerabilities


Sun Jun 11 13:37:10
(~/clojure/squint-test)-(!2026)-> npm install squint-cljs@latest
npm WARN [email protected] No description
npm WARN [email protected] No repository field.

+ [email protected]
updated 1 package and audited 1 package in 0.194s
found 0 vulnerabilities


Sun Jun 11 13:37:18
(~/clojure/squint-test)-(!2026)-> npx squint --help
Unexpected string

Sun Jun 11 13:37:44
(~/clojure/squint-test)-(!2027)->
Could this be due to my node/`npm` being old?
(~/clojure/squint-test)-(!2027)-> node --version
v10.19.0

Sun Jun 11 13:38:19
(~/clojure/squint-test)-(!2028)-> npm --version
6.14.4

Sun Jun 11 13:38:25
(~/clojure/squint-test)-(!2029)->

alexdavis20:06:29

That is a very old version of node, worth updating it (or use something like nvm to enable easy version management)

borkdude20:06:15

This is what I'm seeing locally:

borkdude@m1 /tmp/sq2 $ echo '{}' > package.json
borkdude@m1 /tmp/sq2 $ npm install squint-cljs@latest

added 1 package, and audited 2 packages in 925ms

found 0 vulnerabilities
borkdude@m1 /tmp/sq2 $ npx squint --version
Squint v0.0.0

Usage: squint <subcommand> <opts>

Subcommands:

-e           <expr>  Compile and run expression.
run       <file.cljs>     Compile and run a file
compile   <file.cljs> ... Compile file(s)
repl                      Start repl
help                      Print this help

Use squint <subcommand> --help to show more info.
borkdude@m1 /tmp/sq2 $ node -v
v17.8.0
Could be worth upgrading your node version. I don't think 10 is supported anymore

seancorfield20:06:11

Yeah, figured. I updated to Node 14.x and it works. Thanks. Hopefully that won't break other stuff I need for work ๐Ÿ™‚

seancorfield20:06:35

(in theory, we run all the work dev stuff on Node 14.x anyway but I think I tried updating once before and stuff broke -- and I'm green enough about JS that debugging that was out of my wheelhouse)