Unable to install packages through atom or shell


#1

I am new to the whole coding thing and just got Atom tonight. I was looking around online and saw a few packages that peaked my interest so I went into Atom and tried to install from there, but only got errors after I tried to install.

Here is the error message that is being given to me every time. I have also tried to install the packages through powershell but it’s just giving the same errors.

I am running Windows 10. Any help would be greatly appreciated.


#2

First, try deleting the folder C:\Users\bigg_\.atom\.apm. It’s just a cache folder, so it’s fine to blow it up, and the error seems to indicate a problem with a file in that folder.


#3

I deleted the folder, retried the installation, and the folder was reinstalled and the same error was given. What kind of sorcery is this


#4

What does the log file say?


#5

The file literally does not exist… I’ve even copied the link from the error message itself and put that into windows explorer and I am only getting errors for that as well


#6

Okay so I found another package that I wanted to install, tried that, and it installed perfectly fine. Is it possible there is a problem with the package itself? I’m trying to get atom-beautify


#7

Ah. When you said packages, I assumed you had tried a bunch already. If it’s just atom-beautify, that’s good information. I still have no way of telling what the error is, but there’s a chance that you can install the package manually and bypass whatever APM is trying to do that isn’t working. Here’s what you need to do:

  1. Install Node.js version 8.11.4 (the current long-term support version, which means that it won’t be obsolete for a while).
  2. Download the atom-beautify code to your computer. You can do this by just downloading the whole repo as a compressed file, but since you’re learning I think it would be beneficial if you allowed me to coach you through your first steps into git (which will make working with Atom more fun and functional). You can use Atom’s built-in git for this, but I don’t think that Atom’s interface is as useful as some of the other ways of using the utility. You should take a look at GitKraken, which is a high-quality git client (open-source, great design, and a visual language that simplifies some of the harder-to-understand parts of the tool). I would also download Git for Windows so that you have command line access through the git command. Yes, I am recommending that you install two more versions of the same program you already have, but trust me when I say that they’re all useful to have for different things. If you choose to use GitKraken, its UI will tell you how to clone the repo. If you use the command line, all you have to do is navigate to a folder where you keep your projects (many serious coders have a folder just named github/) and type git clone https://github.com/Glavin001/atom-beautify/.
  3. Once the package code is in a folder on your computer and you have Node installed, you can use npm install inside that folder to install its dependencies. If that works, just run apm link to create a fake folder inside .atom/packages/ that points to the code folder.
  4. Restart Atom and the package should be functional.

Installing “atom-beautify@0.33.0” failed
#8

First of all, I sincerely appreciate you taking the time to help me out. I did everything as you asked me to and it worked perfectly. I can’t thank you enough! I’m excited to work with GitKraken, it looks very nice. Wow, thanks again!


#9

No problem. :slight_smile: One of the great things about open-source software is that you can build it yourself, and in this case we’re working with a compiler (the JavaScript engine inside Atom) that has features that require just a tiny bit of specialized knowledge but make changing its behavior very easy, and the same techniques used in developing new packages can be used to circumvent errors that aren’t coming from the package code.

The drawback of this approach is that atom-beautify will not update itself when a new version comes out. Instead, you have the ability to use any version of the package you want if you keep your repo up to date, because git lets you open old versions of files that have been saved (“committed” in the lingo) and you can see which versions of the code were released as new versions of the package. When you check out a different branch or commit, git actually rewrites every file it has been told to track (everything except what’s listed in .gitignore) to the other state.

This particular bug is happening somewhere in the busy scramble of activity that happens when dozens of tiny Node packages are called down and assembled into the node_modules/ folder, but it’s not a problem with the transfer of those files. Instead, some of the code that was written for Atom’s package manager, potentially code designed to prevent you from making a new download every time you use an especially common package like underscore. The bug repeats for atom-beautify, but not any other package so far. One of APM’s developers might be able to give us a satisfactory answer, but it’s unlikely to be something that the package author can do anything about.


#10

Yeah I saw that Atom is open source and hackable but I had no idea what that actually meant. I see now what they mean. Since it won’t update on it’s own I will probably end up checking back once a month just to see if it has any new major updates and then download again through Kraken.

Well and what was kind of weird was the log file not being there. So I’m not sure what was going on with that. I looked around online for a few hours with my problem and never found a solid answer as to a fix so that’s why I made this post. If more people have this issue maybe the devs could look into it.

Either way, I have the package and now my code doesn’t look TOO much like trash anymore. :smiley:


#11

…you may want to read this:
https://flight-manual.atom.io/


#12

I will definitely give that a read. Maybe it will help me grasp the program a little more at least. Thanks