AgentGPT icon indicating copy to clipboard operation
AgentGPT copied to clipboard

npx db push

Open iplayfast opened this issue 3 years ago • 2 comments

npx db push npm ERR! could not determine executable to run

npm ERR! A complete log of this run can be found in: /home/chris/.npm/_logs/2023-04-10T07_34_34_100Z-debug-0.log

cat ~/.npm/_logs/2023-04-10T07_34_34_100Z-debug-0.log 0 verbose cli /usr/bin/node /usr/local/lib/node_modules/npm/bin/npm-cli.js 1 info using [email protected] 2 info using [email protected] 3 timing npm:load:whichnode Completed in 2ms 4 timing config:load:defaults Completed in 2ms 5 timing config:load:file:/usr/local/lib/node_modules/npm/npmrc Completed in 1ms 6 timing config:load:builtin Completed in 1ms 7 timing config:load:cli Completed in 1ms 8 timing config:load:env Completed in 0ms 9 timing config:load:file:/home/chris/ai/data/aiAgent/AgentGPT/.npmrc Completed in 0ms 10 timing config:load:project Completed in 3ms 11 timing config:load:file:/home/chris/.npmrc Completed in 0ms 12 timing config:load:user Completed in 0ms 13 timing config:load:file:/etc/npmrc Completed in 0ms 14 timing config:load:global Completed in 0ms 15 timing config:load:setEnvs Completed in 1ms 16 timing config:load Completed in 9ms 17 timing npm:load:configload Completed in 9ms 18 timing npm:load:mkdirpcache Completed in 0ms 19 timing npm:load:mkdirplogs Completed in 0ms 20 verbose title npm exec db push 21 verbose argv "exec" "--" "db" "push" 22 timing npm:load:setTitle Completed in 1ms 23 timing config:load:flatten Completed in 2ms 24 timing npm:load:display Completed in 2ms 25 verbose logfile logs-max:10 dir:/home/chris/.npm/_logs/2023-04-10T07_34_34_100Z- 26 verbose logfile /home/chris/.npm/_logs/2023-04-10T07_34_34_100Z-debug-0.log 27 timing npm:load:logFile Completed in 5ms 28 timing npm:load:timers Completed in 0ms 29 timing npm:load:configScope Completed in 0ms 30 timing npm:load Completed in 19ms 31 silly logfile start cleaning logs, removing 1 files 32 silly logfile done cleaning log files 33 timing arborist:ctor Completed in 0ms 34 http fetch GET 200 https://registry.npmjs.org/db 172ms (cache revalidated) 35 timing command:exec Completed in 194ms 36 verbose stack Error: could not determine executable to run 36 verbose stack at getBinFromManifest (/usr/local/lib/node_modules/npm/node_modules/libnpmexec/lib/get-bin-from-manifest.js:17:23) 36 verbose stack at exec (/usr/local/lib/node_modules/npm/node_modules/libnpmexec/lib/index.js:185:15) 36 verbose stack at async module.exports (/usr/local/lib/node_modules/npm/lib/cli.js:89:5) 37 verbose pkgid [email protected] 38 verbose cwd /home/chris/ai/data/aiAgent/AgentGPT 39 verbose Linux 5.19.0-38-generic 40 verbose node v18.15.0 41 verbose npm v9.6.4 42 error could not determine executable to run 43 verbose exit 1 44 timing npm Completed in 224ms 45 verbose code 1 46 error A complete log of this run can be found in: /home/chris/.npm/_logs/2023-04-10T07_34_34_100Z-debug-0.log

I'm not familar with npx so ?

iplayfast avatar Apr 10 '23 07:04 iplayfast

When running the command on Mac, I get the following:

Prisma schema loaded from prisma/schema.prisma Datasource "db": PostgreSQL database

Error: Prisma schema validation - (get-config wasm) Error code: P1012 error: Environment variable not found: DATABASE_URL. --> schema.prisma:7 | 6 | provider = "postgresql" 7 | url = env("DATABASE_URL") |

Validation Error Count: 1 [Context: getConfig]

peterqstorm avatar Apr 10 '23 10:04 peterqstorm

@peterqstorm You need to change the .env DATABASE_URL for actual database (hosted or local) supporting postgresql. Now there is only placeholder. Took me awhile to figure out. Could be explained in ReadMe.

etherealheim avatar Apr 12 '23 08:04 etherealheim