OttoAllmendinger / gnome-shell-screenshot

Gnome Shell extension for making and uploading screenshots
MIT License
267 stars 53 forks source link

Unable to compile on ArchLinux #132

Closed terencode closed 3 years ago

terencode commented 3 years ago

Here is the output when I run make:

git submodule update --init
Submodule 'gselib' (https://github.com/OttoAllmendinger/gselib.git) registered for path 'gselib'
Submodule 'ts-for-gjs' (https://github.com/sammydre/ts-for-gjs) registered for path 'ts-for-gjs'
Cloning into '/mnt/WDC/Documents/Git/GNOME/gnome-shell-screenshot/gselib'...
Cloning into '/mnt/WDC/Documents/Git/GNOME/gnome-shell-screenshot/ts-for-gjs'...
Submodule path 'gselib': checked out 'f198ed3a147ab647dbe1981a24f9bb03271fea4e'
Submodule path 'ts-for-gjs': checked out 'ac6f2f84e6908f4cc27eadbd9e232eb0ae67fd4a'
make archive
make[1]: Entering directory '/mnt/WDC/Documents/Git/GNOME/gnome-shell-screenshot'
sed 's/_gitversion_/v50-2-g5c1e125/' src/metadata.json.in > res/metadata.json
rm gnome-shell-screenshot.zip
rm: cannot remove 'gnome-shell-screenshot.zip': No such file or directory
make[1]: [gselib/make/gnome-shell-extension.mk:24: gnome-shell-screenshot.zip] Error 1 (ignored)
cd dist/ && zip ../gnome-shell-screenshot.zip *.js
/bin/sh: line 0: cd: dist/: No such file or directory
make[1]: *** [gselib/make/gnome-shell-extension.mk:25: gnome-shell-screenshot.zip] Error 1
make[1]: Leaving directory '/mnt/WDC/Documents/Git/GNOME/gnome-shell-screenshot'
make: *** [Makefile:8: all] Error 2

This is coming from gselib/make/gnome-shell-extension.mk:

make -f gselib/make/gnome-shell-extension.mk
rm -rf @types/
./ts-for-gjs/bin/run generate --configName=./.ts-for-girrc.js > /dev/null 2>&1
make: *** [gselib/make/gnome-shell-extension.mk:34: @types/] Error 1

and executing ./ts-for-gjs/bin/run generate --configName=./.ts-for-girrc.js gives:

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

Error: Cannot find module 'source-map-support'
Require stack:
- /mnt/WDC/Documents/Git/GNOME/gnome-shell-screenshot/ts-for-gjs/bin/run
    at Function.Module._resolveFilename (node:internal/modules/cjs/loader:900:15)
    at Function.Module._load (node:internal/modules/cjs/loader:745:27)
    at Module.require (node:internal/modules/cjs/loader:972:19)
    at require (node:internal/modules/cjs/helpers:88:18)
    at Object.<anonymous> (/mnt/WDC/Documents/Git/GNOME/gnome-shell-screenshot/ts-for-gjs/bin/run:4:1)
    at Module._compile (node:internal/modules/cjs/loader:1083:30)
    at Object.Module._extensions..js (node:internal/modules/cjs/loader:1112:10)
    at Module.load (node:internal/modules/cjs/loader:948:32)
    at Function.Module._load (node:internal/modules/cjs/loader:789:14)
    at Function.executeUserEntryPoint [as runMain] (node:internal/modules/run_main:72:12) {
  code: 'MODULE_NOT_FOUND',
  requireStack: [
    '/mnt/WDC/Documents/Git/GNOME/gnome-shell-screenshot/ts-for-gjs/bin/run'
  ]
}
terencode commented 3 years ago

I tried installing ts-node and typescript but it didn't work as-is. Maybe there are some extra options to pass to use system packages?

andreluisos commented 3 years ago

Same issue.

drakkar1969 commented 3 years ago

Same here

OttoAllmendinger commented 3 years ago

please try again with latest master

yarn and npm are required

in ts-for-gjs we need to run npm install

in the main dir we need to run yarn install

the updated Makefile should take care of it

drakkar1969 commented 3 years ago

Still getting make error (installing with AUR -git package):

git submodule update --init
Submodule 'gselib' (https://github.com/OttoAllmendinger/gselib.git) registered for path 'gselib'
Submodule 'ts-for-gjs' (https://github.com/sammydre/ts-for-gjs) registered for path 'ts-for-gjs'
Cloning into '/home/drakkar/.cache/pikaur/build/gnome-shell-extension-screenshot-git/src/gnome-shell-extension-screenshot-git/gselib'...
Cloning into '/home/drakkar/.cache/pikaur/build/gnome-shell-extension-screenshot-git/src/gnome-shell-extension-screenshot-git/ts-for-gjs'...
Submodule path 'gselib': checked out 'fb52faf398e1737a1ae3a57122acb3cbf675c4ec'
Submodule path 'ts-for-gjs': checked out 'ac6f2f84e6908f4cc27eadbd9e232eb0ae67fd4a'
make archive
make[1]: warning: jobserver unavailable: using -j1.  Add '+' to parent make rule.
make[1]: Entering directory '/home/drakkar/.cache/pikaur/build/gnome-shell-extension-screenshot-git/src/gnome-shell-extension-screenshot-git'
sed 's/_gitversion_/v50-3-g554b69b/' src/metadata.json.in > res/metadata.json
rm gnome-shell-screenshot.zip
rm: cannot remove 'gnome-shell-screenshot.zip': No such file or directory
make[1]: [gselib/make/gnome-shell-extension.mk:31: gnome-shell-screenshot.zip] Error 1 (ignored)
cd dist/ && zip ../gnome-shell-screenshot.zip *.js
/bin/sh: line 0: cd: dist/: No such file or directory
make[1]: *** [gselib/make/gnome-shell-extension.mk:32: gnome-shell-screenshot.zip] Error 1
make[1]: Leaving directory '/home/drakkar/.cache/pikaur/build/gnome-shell-extension-screenshot-git/src/gnome-shell-extension-screenshot-git'
make: *** [Makefile:8: all] Error 2

yarn and npm both installed

terencode commented 3 years ago

It's because the PKGBUILD sets EXTENSION_PATH and gselib/make/gnome-shell-extension.mk doesn't seem to support setting it manually.

OttoAllmendinger commented 3 years ago

please try again with latest master

drakkar1969 commented 3 years ago

Works for me now. Thanks for the follow up!