Cant setup pgAPI "Database as a service" on Macbook M1 Air, errors on terminal

24 views Asked by At

I have been trying to setup pgAPI on my mac but I am unable to due to some errors I am constantly facing. Some of them are mentioned below:

ust/local/11b/node_modules/npm/node.
_modules/node-gyp/bin/node-gyp.js build =-fal
1back-to-build --module=/Users/sarmad/pgapi-starter-template/node_modules/bcrypt
/lib/binding/bcrypt_lib.node -module
_name=bcrypt_11b —module_path=/Users/ sarma
d/pgapi-starter-template/node_modules/bcrypt/lib/binding --napi.
_version=9 --node
_napi=napi —-napi_build
_version=0 --node_napi.
_label=node-v108' (1)
nom
ERR!
node-pre-gyp ERR! stack
at ChildProcess.<anonymous> (/Users/sarmad/
pgapi-starter-template/node _modules/node-pre-gyp/lib/util/compile.js:83:29)
npm
ERR!
node-pre-gyp ERR! stack
at ChildProcess.emit (node:events:517:28)
ERR!
node-pre-gyp ERR! stack
at maybeClose (node:internal/child_process:
1098:16)
ERR.
node-pre-gyp ERR! stack at ChildProcess._handle.onexit (node:intern
al/child_process:303:5)
npm
ERR
node-pre-gyp ERR! System Darwin 23.0.0
npm
ERR!
node-pre-gyp ERR! command "/us/local/bin/node" "/Users/sarmad/pgapi-st
arter-template/node_modules/.bin/node-pre-gyp" "install" "_-fallback-to-build"
ERR!
/bcrypt
node-pre-gyp ERR! cwd /Users/sarmad/pgapi-starter-template/node_modules
npm
ERR!
npm
ERR!
npm
ERR!
node-pre-gyp ERR! node -v v18.18.2
node-pre-gyp ERR! node-pre-gyp -v v0.14.0 node-pre-gyp ERR! not ok
ERR!

I have tried solving these errors but I am unable to and there are other errors due to this:

node:internal/modules/cjs/loader:1080
  throw err;
  ^

Error: Cannot find module 'express'

and after this the error was of dotenv Please help me with this setup

I tried multiple solutions on the stackoverflow but the are not working. Even tried the docker method explained in the documentation but the image crashes immediately.

0

There are 0 answers