Sublime Forum

[BUG] Sublime-Text can't find nodejs on Pop OS (Ubuntu 20.10)

#1

I’m trying to get the Microsoft TypeScript Plugin to work, and it needs Sublime-Text to find nodejs to do so. I’ve raised the following issue on their github https://github.com/microsoft/TypeScript-Sublime-Plugin/issues/766 , but at this point in my explorations, I believe the issue lies with Sublime-Text itself.

Basically, I’ve used the python in their plugin to explore the filesystem that is “generated” by Sublime-Text when it is launched. I use the word “generated”, because clearly, it is not the same as my user filesystem. The /usr/bin and /usr/local/bin directories in particular are vastly different from the point of view of Sublime-Text, as to what they’re supposed to be from my terminal. I’d never heard of nfsnobody system account before today, but it seems like Sublime-Text creates some form of extra user account to launch itself using such a scheme? I don’t really understand how the app functions. But I can tell that its filesystem has notable differences, and for this reason does not find node.

For example, here are the last lines from an ls -al /usr/bin/ from a normal terminal:

-rwxr-xr-x  1 root root       89488 Apr 21  2017  zipnote
-rwxr-xr-x  1 root root       93584 Apr 21  2017  zipsplit
-rwxr-xr-x  1 root root       26952 May 25  2020  zjsdecode
-rwxr-xr-x  1 root root        2206 May 28  2020  zless
-rwxr-xr-x  1 root root        1842 May 28  2020  zmore
-rwxr-xr-x  1 root root        4553 May 28  2020  znew
-rwxr-xr-x  1 root root      878288 Jun 30  2020  zsh
-rwxr-xr-x  1 root root         843 Feb 21  2020  zsh5

And now in the Sublime-Text console from my plugin hacking

lrwxrwxrwx  1 fulguritude fulguritude        5 Oct 28 00:58 zipinfo -> unzip
-rwxr-xr-x  4 fulguritude fulguritude   101952 Jan  1  1970 zipnote
-rwxr-xr-x  4 fulguritude fulguritude   106048 Jan  1  1970 zipsplit
-rwxr-xr-x  8 fulguritude fulguritude     2206 Jan  1  1970 zless
-rwxr-xr-x  8 fulguritude fulguritude     1842 Jan  1  1970 zmore
-rwxr-xr-x  8 fulguritude fulguritude     4553 Jan  1  1970 znew
-rwxr-xr-x  4 fulguritude fulguritude   117104 Jan  1  1970 zramctl

Weird dates, not the same user, missing binaries, etc. While /usr/local/bin, where my node executable is (nowadays after multiple reinstalls trying to fix this problem) is outright empty in the Sublime-Text console logs.

Thank you for your help in hepling me fix this issue.

NB: the same issue of not finding node happened with the ArcticTypeScript plugin, which I now believe to be the same as this one.

0 Likes

#2

Sublime doesn’t do that; it’s just a standard application. It sounds like PopOS is a Linux distro that tries to run all apps in their own sandboxed chroot jail or something along those lines, if the file system as Sublime sees it is different than reality.

Unfortunately, that’s a flavour of Linux that I’m not familiar with, so apart from that I’m not sure how one might resolve the issue.

0 Likes

#3

Thank you for your quick reply. I’ve made an issue on the Pop! OS github, and will let you know how it evolves:

1 Like

#4

The issue was the flatpak sandbox environment. Downloading sublime text following this procedure: https://www.sublimetext.com/docs/3/linux_repositories.html rather than the Pop! Shop flatpak executable solved the problem. It means redoing my ST3 setup a bit, but I mean, it’s worth the trouble :slight_smile:

Thanks again !

1 Like

#5

Glad you got that sorted out. :slight_smile:

1 Like