Aylur / ags

A customizable and extensible shell
GNU General Public License v3.0
2.22k stars 116 forks source link

Unable to build #234

Closed spheenik closed 10 months ago

spheenik commented 10 months ago

Hi,

I cloned, issued pnpm i -r to recursively fetch node dependencies, then meson setup build && cd build, then meson compile which gives me:

➜  ~ cd projects/ags/build 
➜  build git:(main) ✗ meson compile
INFO: autodetecting backend as ninja
INFO: calculating backend command to run: /usr/bin/ninja
[1/2] Generating src/typescript-compile with a custom command
FAILED: src/tsc-output 
/usr/bin/tsc --outDir /home/spheenik/projects/ags/build/tsc-out
../src/app.ts(217,13): error TS2304: Cannot find name 'logError'.
../src/app.ts(263,40): error TS2304: Cannot find name 'logError'.
../src/app.ts(272,47): error TS2304: Cannot find name 'logError'.
../src/app.ts(284,20): error TS2304: Cannot find name 'logError'.
../src/overrides.ts(19,13): error TS2304: Cannot find name 'logError'.
../src/service/bluetooth.ts(175,21): error TS2304: Cannot find name 'logError'.
../src/service/hyprland.ts(191,13): error TS2304: Cannot find name 'logError'.
../src/service/hyprland.ts(204,13): error TS2304: Cannot find name 'logError'.
../src/service/hyprland.ts(217,13): error TS2304: Cannot find name 'logError'.
../src/service/mpris.ts(200,21): error TS2304: Cannot find name 'logError'.
../src/service/mpris.ts(324,20): error TS2304: Cannot find name 'logError'.
../src/service/network.ts(241,13): error TS2304: Cannot find name 'logError'.
../src/utils/etc.ts(14,9): error TS2304: Cannot find name 'logError'.
../src/utils/exec.ts(51,15): error TS2552: Cannot find name 'logError'. Did you mean 'onError'?
../src/utils/exec.ts(64,21): error TS2552: Cannot find name 'logError'. Did you mean 'onError'?
../src/utils/exec.ts(93,9): error TS2552: Cannot find name 'logError'. Did you mean 'onError'?
../src/utils/file.ts(87,9): error TS2304: Cannot find name 'logError'.
../src/widgets/icon.ts(7,19): error TS2307: Cannot find module '@girs/cairo-1.0' or its corresponding type declarations.
../src/widgets/label.ts(57,21): error TS2304: Cannot find name 'logError'.
ninja: build stopped: subcommand failed.

What did I do wrong?

kotontrion commented 10 months ago

I had a look and noticed not all depencencies are listed in the package.json. add this to the devDependencies in package.json:

"@girs/gjs": "^3.2.6",
"@girs/cairo-1.0": "^1.0.0-3.2.6",

those dependencies are not listed there, therefore pnpm wont install them, npm on the other hand does.

spheenik commented 10 months ago

Yes, that worked. Question is why npm installs dependencies that are not listed... Thank you anyway!

kotontrion commented 10 months ago

I'm not 100% sure about this, but my guess is that because all of @girs is in the same repository, npm just pulls the whole repository, while pnpm just pulls the specified packages.