mckaywrigley/the-network-state-gpt

Running into an issue with the scrape command

Closed this issue · 3 comments

Thanks for all your work on this!

I am trying to get this up and running on an Ubuntu 20.04 box, but am getting an error (please see below).

Also, I left the SUPABASE_SERVICE_ROLE_KEY blank in the .env.local file as I did not enable RLS (this is my first time using Supabase and I'm not sure how to set up a service role).

> the-network-state-gpt@0.1.0 scrape /root/the-network-state-gpt
> tsx scripts/scrape.ts

/root/the-network-state-gpt/node_modules/tsx/dist/cli.js:2
import ys from"tty";import{v as ws}from"./package-e00fa201.js";import{r as Dt}from"./pkgroll_create-require-6ea41e12.js";import{pathToFileURL as Rs,fileURLToPath as bs}from"url";import vs from"child_process";import K from"path";import ie from"fs";import Fu,{constants as Bs}from"os";import Ss from"events";import me from"util";import $s from"stream";import"module";const Ts="known-flag",xs="unknown-flag",Os="argument",{stringify:_e}=JSON,Ns=/\B([A-Z])/g,Hs=t=>t.replace(Ns,"-$1").toLowerCase(),{hasOwnProperty:Ps}=Object.prototype,Ae=(t,e)=>Ps.call(t,e),Ls=t=>Array.isArray(t),gu=t=>typeof t=="function"?[t,!1]:Ls(t)?[t[0],!0]:gu(t.type),Is=(t,e)=>t===Boolean?e!=="false":e,ks=(t,e)=>typeof e=="boolean"?e:t===Number&&e===""?Number.NaN:t(e),Ms=/[\s.:=]/,Ws=t=>{const e=`Flag name ${_e(t)}`;if(t.length===0)throw new Error(`${e} cannot be empty`);if(t.length===1)throw new Error(`${e} must be longer than a character`);const u=t.match(Ms);if(u)throw new Error(`${

SyntaxError: Unexpected identifier
    at Module._compile (internal/modules/cjs/loader.js:723:23)
    at Object.Module._extensions..js (internal/modules/cjs/loader.js:789:10)
    at Module.load (internal/modules/cjs/loader.js:653:32)
    at tryModuleLoad (internal/modules/cjs/loader.js:593:12)
    at Function.Module._load (internal/modules/cjs/loader.js:585:3)
    at Function.Module.runMain (internal/modules/cjs/loader.js:831:12)
    at startup (internal/bootstrap/node.js:283:19)
    at bootstrapNodeJSCore (internal/bootstrap/node.js:623:3)
npm ERR! code ELIFECYCLE
npm ERR! errno 1
npm ERR! the-network-state-gpt@0.1.0 scrape: `tsx scripts/scrape.ts`
npm ERR! Exit status 1
npm ERR! 
npm ERR! Failed at the the-network-state-gpt@0.1.0 scrape script.
npm ERR! This is probably not a problem with npm. There is likely additional logging output above.

I was able to handle the service role part - I figured out where to go to enable RLS and get the service role API key.

I am still encountering the above error, though. Thanks!

Hmm... seems to be a problem with the tsx package? I wonder if deleting the node_modules folder and package.lock.json and running npm i again might help.

It's done the trick for me before. Just a thought.

Redid on a new box and got it working :) Thanks!!