question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

v4.1.2 is taking current directory as root directory

See original GitHub issue

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 takes process.env.PWD as the root directory which causes error like this…

❯ alacritty-themes
? Select a theme ›
❯   3024.dark
    3024.light
    Afterglow
    Argonaut
    Ashes.dark
    Ashes.light
    Astromouse
    Atelierdune.dark
    Atelierdune.light
  ↓ Atelierforest.darknode:fs:585
  handleErrorFromBinding(ctx);
  ^

Error: ENOENT: no such file or directory, open '/home/USER/themes/3024.dark.yml'
    at Object.openSync (node:fs:585:3)
    at Object.readFileSync (node:fs:453:35)
    at updateThemeWithFile (/usr/lib/node_modules/alacritty-themes/index.js:51:24)
    at updateTheme (/usr/lib/node_modules/alacritty-themes/index.js:100:10)
    at /usr/lib/node_modules/alacritty-themes/index.js:107:12 {
  errno: -2,
  syscall: 'open',
  code: 'ENOENT',
  path: '/home/USER/themes/3024.dark.yml'
}

problematic line

To Reproduce Steps to reproduce the behavior:

  1. install v4.1.2
  2. run alacritty-themes in terminal
  3. See error

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):

  • OS: Linux
  • Version v4.1.2

Additional context I will try to patch it by hard coding the location for now and update the package.

Issue Analytics

  • State:closed
  • Created 2 years ago
  • Comments:14 (8 by maintainers)

github_iconTop GitHub Comments

2reactions
z00ratcommented, Sep 29, 2021

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.

2reactions
z00ratcommented, Sep 22, 2021

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.

Read more comments on GitHub >

github_iconTop Results From Across the Web

Directory.GetDirectoryRoot(String) Method (System.IO)
Returns the volume information, root information, or both for the specified path.
Read more >
Unable to list FTP root directory · Issue #1060 · icetee/remote-ftp
When using remote-ftp package version 2.0.0, 1.3.4, 1.3.1, 1.2.6 and 1.2.1 when I connect to a FTP ... Current restricted directory is /...
Read more >
Determine project root from a running node.js application
This returns the current working directory. ... uses several techniques to determine the root path of the app, taking into account globally ...
Read more >
Linux Command Line (04) CD - Change Directory - YouTube
We see the / is the root directory and when we start a path with / we ... cd – will take you...
Read more >
1.7 Working directories | An Introduction to R
If you weren't using an RStudio Project then you would have to set your working directory using the setwd() function at the start...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found