Closed z00rat closed 3 years ago
This was enough to fix the problem in my package.
--- index.original.js 2021-09-22 11:53:04.435471903 +0600
+++ pkg/alacritty-themes/usr/lib/node_modules/alacritty-themes/src/helpers/index.js 2021-09-22 11:53:33.317118492 +0600
@@ -7,7 +7,7 @@
);
function rootDirectory() {
- return process.env.PWD;
+ return "/usr/lib/node_modules/alacritty-themes";
}
function themeFilePath(themeName) {
Hi @z00rat, thank you for opening this issue, sorry for the issue.
I thought the rootDirectory
method is returning the root alacritty-themes folder package but it seems like it's returning this one pkg/alacritty-themes/usr/lib/node_modules/alacritty-themes/src/helpers/index.js
, right?
since you are using the AUR package manager, it means you didn't use npx alacritty-themes
either npm i -g alacritty-themes
, right?
how can I install the AUR package manager and use it in arch? I'll try to reproduce the error in a docker container if you have baby steps it would be great, please! (I haven't used arch at all)
being on ubuntu, I just printed out the PWD in the bin/cli.js
file and it returns the alacritty-themes
directory
I thought the
rootDirectory
method is returning the root alacritty-themes folder package but it seems like it's returning this onepkg/alacritty-themes/usr/lib/node_modules/alacritty-themes/src/helpers/index.js
, right?
No. that location is in my build environment. what i wish to get is /usr/lib/node_modules/alacritty-themes
. But i'm getting current directory. Like if I run from ~/docs/whatever/testing
i'm getting /home/USER/docs/whatever/testing
since you are using the AUR package manager, it means you didn't use
npx alacritty-themes
eithernpm i -g alacritty-themes
, right?
sorry for not telling you that but npm i -g alacritty-themes
is broken. and the way we package this app is just like what npm do.
and now i tried npx alacritty-themes
one too. it still broken.
btw, im using node v16.9.1
how can I install the AUR package manager and use it in arch? I'll try to reproduce the error in a docker container if you have baby steps it would be great, please! (I haven't used arch at all)
I think this is enough: https://dev.to/cloudx/testing-our-package-build-in-the-docker-world-34p0 you will need a AUR helper to install from AUR. I recommend paru. my package like is https://aur.archlinux.org/packages/alacritty-themes/
(I haven't used arch at all)
the pain and fun about using archlinux is you have to read a lot of docs....
I'd like to change to archlinux one day. what distro do you recommend?
I just tried and yes, I noticed the npx alacritty-theme
is broken, so, I'm able to reproduce the error, I'll take a look as soon as possible.
being on ubuntu, I just printed out the PWD in the
bin/cli.js
file and it returns thealacritty-themes
directory
nop something is wrong...
and if ya need it.....
btw you are using ./bin/cli.js
but when i say alacritty-themes
it means
❯ where alacritty-themes
/usr/bin/alacritty-themes
❯ file /usr/bin/alacritty-themes
/usr/bin/alacritty-themes: symbolic link to ../lib/node_modules/alacritty-themes/bin/cli.js
taking advantage of you are online, I'll do a quick change in order to see if it solves the problem, oh! but I cannot release versions, would you use the commit's SHA in order to just test?
I'd like to change to archlinux one day. what distro do you recommend?
TBH here, I use arch because it gives me nothing at first and i have to do almost everything by myself. which is the best for making a system like your dream. Drawback, it takes a loooooooooot of time. play around in vm then move. thats what i like to do.
I just tried and yes, I noticed the
npx alacritty-theme
is broken, so, I'm able to reproduce the error, I'll take a look as soon as possible.
yay so im not wrong.
taking advantage of you are online, I'll do a quick change in order to see if it solves the problem, oh! but I cannot release versions, would you use the commit's SHA in order to just test?
it will be better if you can give me a file like https://registry.npmjs.org/alacritty-themes/-/alacritty-themes-4.1.2.tgz no clue how to build one like this.
in my package i download this from npm and tell npm to install it a folder as if its root directory. this is what i followed https://wiki.archlinux.org/title/Node.js_package_guidelines its just a wrapper around npm .....
I created this pull request after finding a potential solution.
so,
the variable __dirname
gives me the actual location of the file. not even the symlinked one.
and from there two step upstairs is the root which we are trying to calculate.
please check if it works on other OS too.
I created this pull request after finding a potential solution. so, the variable
__dirname
gives me the actual location of the file. not even the symlinked one. and from there two step upstairs is the root which we are trying to calculate.please check if it works on other OS too.
Thanks a bunch. Your solution worked for me.
I was facing the same issue when I installed alacritty-themes using npm (installed via nvm) on Pop!_OS.
In my case, the installation directory was
~/.nvm/versions/node/v14.17.6/lib/node_modules/alacritty-themes
but alacritty-themes was looking in my current working director to find the themes directory.
updated my package this morning and no one complained .... looks good bro.
its was fun working on this bug. learned a lot.
Cool!! you are always welcome to contribute here! BTW, I read more about rolling release operative systems and I just switched to manjaro, I had some problems installing RVM (ruby version manager) because I used to develop on ruby and rails but at the end I was able to solved (reading the Arch Wiki). so far Manjaro is super cool all it's easy with the pamac tool.
You inspired me to switch, thank you!
Cool!! you are always welcome to contribute here! BTW, I read more about rolling release operative systems and I just switched to manjaro, I had some problems installing RVM (ruby version manager) because I used to develop on ruby and rails but at the end I was able to solved (reading the Arch Wiki). so far Manjaro is super cool all it's easy with the pamac tool.
You inspired me to switch, thank you!
hahaha its nothing.
manjaro is a good start but dont be there for too long its takes sometime before releasing updates. which is not good for following the archwiki TBH. be on manjaro for leaning the basics then move to pure arch and make the system yours.
Hi, I am the package manager of this in AUR. When i tried to update it i got in to this problem.
Describe the bug This program takes current directory as the root directory of the package. In the new update
rootDirectory()
function takesprocess.env.PWD
as the root directory which causes error like this...problematic line
To Reproduce Steps to reproduce the behavior:
Expected behavior taking root directory as root directory. For linux where its installed as root is "/usr/lib/node_modules/alacritty-themes".
Desktop (please complete the following information):
Additional context I will try to patch it by hard coding the location for now and update the package.