sourcegraph / scip-python

SCIP indexer for Python
Other
55 stars 25 forks source link

scip-python doesn't run #53

Closed leifwalsh closed 2 years ago

leifwalsh commented 2 years ago

I tried npx @sourcegraph/scip-python --help and also tried installing it and then running it, it just crashes. After installing it, it dumps out a huge amount of minified javascript and then gives me this stacktrace:

❯ node_modules/.bin/scip-python --help
<minified js>

SyntaxError: Unexpected token '?'
    at wrapSafe (internal/modules/cjs/loader.js:931:16)
    at Module._compile (internal/modules/cjs/loader.js:979:27)
    at Object.Module._extensions..js (internal/modules/cjs/loader.js:1035:10)
    at Module.load (internal/modules/cjs/loader.js:879:32)
    at Function.Module._load (internal/modules/cjs/loader.js:724:14)
    at Module.require (internal/modules/cjs/loader.js:903:19)
    at require (internal/modules/cjs/helpers.js:74:18)
    at Object.r.f.require (/home/leif/tmp/node_modules/@sourcegraph/scip-python/dist/scip-python.js:1:92971)
    at /home/leif/tmp/node_modules/@sourcegraph/scip-python/dist/scip-python.js:1:92491
    at Array.reduce (<anonymous>)

Here are some versions:

❯ node --version && npm --version && npx --version
v12.19.0
6.14.8
6.14.8
nejch commented 2 years ago

@leifwalsh I tested the docker image and that works, so you might have some luck comparing your environment to https://github.com/sourcegraph/scip-python/blob/scip/Dockerfile.autoindex if you just need something to work.

varungandhi-src commented 2 years ago

Yeah, v12.19.0 is a very old version of node. Using Node 16+ should do the trick as per the Dockerfile.

varungandhi-src commented 2 years ago

@leifwalsh I've created https://github.com/sourcegraph/scip-python/pull/55 to document this.

leifwalsh commented 2 years ago

thanks, I hardly ever use node and forgot how quickly they EOL