open-condo-software / condo

Open source condominium management platform
MIT License
55 stars 22 forks source link

Can't install #4899

Open maxtimbo opened 5 days ago

maxtimbo commented 5 days ago

I'm getting the following error:

$ node ./bin/prepare.js 
node:internal/modules/cjs/loader:1031
  throw err;
  ^

Error: Cannot find module 'commander'
Require stack:
- /home/tfinley/condo/bin/prepare.js
    at Function.Module._resolveFilename (node:internal/modules/cjs/loader:1028:15)
    at Function.Module._load (node:internal/modules/cjs/loader:873:27)
    at Module.require (node:internal/modules/cjs/loader:1100:19)
    at require (node:internal/modules/cjs/helpers:119:18)
    at Object.<anonymous> (/home/tfinley/condo/bin/prepare.js:3:21)
    at Module._compile (node:internal/modules/cjs/loader:1198:14)
    at Object.Module._extensions..js (node:internal/modules/cjs/loader:1252:10)
    at Module.load (node:internal/modules/cjs/loader:1076:32)
    at Function.Module._load (node:internal/modules/cjs/loader:911:12)
    at Function.executeUserEntryPoint [as runMain] (node:internal/modules/run_main:81:12) {
  code: 'MODULE_NOT_FOUND',
  requireStack: [ '/home/tfinley/condo/bin/prepare.js' ]
}
$ node -v
v16.20.2

I've tried to install commander globally, but that doesn't work either.

SavelevMatthew commented 4 days ago

Hi, it seems you missed the package installation part (yarn, yarn install or similar command for another package manager)

Because commander is explicitly listed in the monorepo root dependencies list: https://github.com/open-condo-software/condo/blob/b40f67557b690dacf22d018e4ca200935a57294f/package.json#L41

maxtimbo commented 4 days ago

I just tried npm install:

$ npm install
npm ERR! code EUNSUPPORTEDPROTOCOL
npm ERR! Unsupported URL Type "link:": link:./domains

yarn gives errors as well:

$ yarn
00h00m00s 0/0: : ERROR: There are no scenarios; must have at least one.

$ yarn install
00h00m00s 0/0: : ERROR: [Errno 2] No such file or directory: 'install'

This is all taking place in the local repo directory that I cloned from github.

SavelevMatthew commented 2 days ago

Seems like it's some local problem happening, you can try reinstall yarn...

https://stackoverflow.com/questions/46013544/yarn-install-command-error-no-such-file-or-directory-install

maxtimbo commented 2 days ago

Alright. New errors:

$ node ./bin/prepare.js

[. . .]

--> Preparing "condo" app
------> Copying app's .env.example values to .env if not exists
------> Writing assigned urls / ports / dbs to app's .env
------> Running migration script
Error: Command failed: yarn workspace @app/condo migrate
ERROR: can't get knex schema

    at ChildProcess.exithandler (node:child_process:402:12)
    at ChildProcess.emit (node:events:513:28)
    at maybeClose (node:internal/child_process:1100:16)
    at Process.ChildProcess._handle.onexit (node:internal/child_process:304:5)