NixOS / nixpkgs

Nix Packages collection & NixOS
MIT License
18.1k stars 14.15k forks source link

hedgedoc manage_users looks for a git repository, fails to start #189213

Open sbourdeauducq opened 2 years ago

sbourdeauducq commented 2 years ago

Describe the bug

$ manage_users 
fatal: not a git repository (or any of the parent directories): .git

Steps To Reproduce

Steps to reproduce the behavior:

  1. nix-shell -p hedgedoc
  2. manage_users

Expected behavior

manage_user runs.

sbourdeauducq commented 1 year ago

Still broken on 22.11, now there is simply no error message printed. @WilliButz @SuperSandro2000

SuperSandro2000 commented 1 year ago

No idea, I would guess the code is broken and needs a fix. I don't really have time to dig into this right now.

sergei-mironov commented 1 year ago

Still broken, unfortunately..

MangoIV commented 9 months ago

I suspect this is because node can't find the required modules on nixos.

MangoIV commented 9 months ago

but perhaps I'm wrong, I don't have an idea about how node works

MangoIV commented 9 months ago

the odd thing about this is, that node runs "successfully" but just doesn't do anything

SuperSandro2000 commented 9 months ago

FYI #283501 but it still does not fully work in the module. Please contribute that.

sbourdeauducq commented 6 months ago

Also does not work outside the module with:

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

Error: Cannot find module '../lib/logger'
Require stack:
- /nix/store/r2zj5v57siavkp0pnlhpsn6d0xk217ma-hedgedoc-1.9.9/bin/.manage_users-wrapped
    at Module._resolveFilename (node:internal/modules/cjs/loader:1143:15)
    at Module._load (node:internal/modules/cjs/loader:984:27)
    at Module.require (node:internal/modules/cjs/loader:1231:19)
    at require (node:internal/modules/helpers:179:18)
    at Object.<anonymous> (/nix/store/r2zj5v57siavkp0pnlhpsn6d0xk217ma-hedgedoc-1.9.9/bin/.manage_users-wrapped:4:16)
    at Module._compile (node:internal/modules/cjs/loader:1369:14)
    at Module._extensions..js (node:internal/modules/cjs/loader:1427:10)
    at Module.load (node:internal/modules/cjs/loader:1206:32)
    at Module._load (node:internal/modules/cjs/loader:1022:12)
    at Function.executeUserEntryPoint [as runMain] (node:internal/modules/run_main:135:12) {
  code: 'MODULE_NOT_FOUND',
  requireStack: [
    '/nix/store/r2zj5v57siavkp0pnlhpsn6d0xk217ma-hedgedoc-1.9.9/bin/.manage_users-wrapped'
  ]
}
thomasfire commented 6 months ago

Also does not work outside the module with:

What are the steps to reproduce? And what are the channels you are using?

sbourdeauducq commented 6 months ago

It's not difficult...

> nix shell nixpkgs#hedgedoc nixpkgs#nodejs
> manage_users
node:internal/modules/cjs/loader:1146
  throw err;
  ^

Error: Cannot find module '../lib/logger'
Require stack:
...
thomasfire commented 6 months ago

For now I would blame e91a7b7a4e9513f4a2741b1a38c52fb81d4c9415