27

I have a computer behind a very restrictive proxy server it only allows me to surf the web and download programs it does not allow programs like the Atom text editor to download it's packages.

My question is how do I install them using only browser based downloads?

Richard Slater
  • 6,313
  • 4
  • 53
  • 81
Lendion
  • 307
  • 1
  • 3
  • 9

3 Answers3

29

It is certainly possible:

  1. Find the package you want to install, for example the activate-power-mode package.
  2. Click on the Repo button to go to the GitHub repository.
  3. Click Releases towards the top of the UI, then click on the most recent release, 0.4.1 in this case.
  4. Download the source code release in either Zip or GZip depending on your platform.
  5. Extract the content of the archive to a known permanent location, I have chosen:

    C:\Source\Atom
    
  6. Run the following command from your terminal / command prompt (make sure to include quotes around the path):

    apm link "C:\Source\Atom\activate-power-mode-0.4.1"
    
  7. Restart or Reload Ctrl-Alt-R Atom and the package will now be installed.

You can alternatively extract the package directly to your ~/.atom/packages folder however you will have to rename the folder to exactly match the name of the package, additionally uninstalling the package from Atom will delete the files which could be annoying if it is an accidental deletion.

Sterling Bourne
  • 3,064
  • 23
  • 22
Richard Slater
  • 6,313
  • 4
  • 53
  • 81
8

Because of package dependencies a safest bet is this:

  1. Install package normally on connected computer
  2. Copy contents from your ~/.atom/packages
  3. Paste contents to ~/.atom/packages on offline computer
  4. Restart Atom

At least this worked for me like a charm.

Andriy Buday
  • 1,959
  • 1
  • 17
  • 40
2

The answer of Richard Slater is informative and the answer of Andriy Buday could look less professional. But, in my case, the answer of Andriy Buday was also very important.

I tried to install two packages atom-beautify and prettier-atom by following the answer of Richard Slater and had some problems of not being able to find some modules. It was not only me who had these problems. Consider checking the following links.

The issue of "cannot find module event-kit"

  1. https://github.com/Glavin001/atom-beautify/issues/1734

  2. https://github.com/Glavin001/atom-beautify/issues/1366#issuecomment-269716306

When I decompressed a file (atom-beautify-0.30.3.tar.gz) I received from GitHub respository, I could find out directories like appveyor, docs, and examples. But I could not find out a directory named node_modules which was present when I installed this package atom-beautify using Atom Editor online.

To check if the absence of directory node_modules is the only problem, I went through the following steps.

  1. Start Atom Editor.

  2. Install atom-beautify using Atom Editor online like the answer of Andriy Buday suggests.

  3. Close Atom Editor.

  4. Move atom-beautify directory from ~/.atom/packages (that was %HOMEDIRECTORY%%HOMEPATH%.atom\packages in my case because I used cmd on Windows 10) to somewhere else.

  5. Decompress atom-beautify-0.30.3.tar.gz and move or copy atom-beautify-0.30.3 directory from this decompressed result into %HOMEDIRECTORY%%HOMEPATH%.atom\packages as the answer of Andriy Buday suggests.

  6. Rename directory %HOMEDIRECTORY%%HOMEPATH%.atom\packages\atom-beautify-0.30.3 to %HOMEDIRECTORY%%HOMEPATH%.atom\packages\atom-beautify as the answer of Richard Slater suggests.

  7. Move or copy node_modules directory from the directory moved at step 4 into %HOMEDIRECTORY%%HOMEPATH%.atom\packages\atom-beautify.

  8. Start Atom Editor.

I found that no error message appeared and that package atom-beautify worked properly, thus I am thinking that absence of node_modules directory was the only problem of the file atom-beautify-0.30.3.tar.gz I received from GitHub repository.

I am afraid if it is normal that directory node_modules is not contained in the file atom-beautify-0.30.3.tar.gz downloaded from GitHub repository because of any rules I do not know yet, like placing directories like node_modules somewhere else. If there really are such rules and somebody tells me about such rules by adding an answer or a comment here, I will appreciate it a lot.

I am not sure if it is same with all other packages, but I found that it was same at least with package prettier-atom.

I wish it helps somebody.

+++++++++++++++++++++++++++

I found why the directory node_modules was not contained in atom-beautify-0.30.3.tar.gz.

I checked answers of the following link.

How can I manually download packages for atom editor and install them (manually)?

Answer by D3181 included a link to a page of http://discuss.atom.io/ (I could get a helpful answer by Alchiadus from the link) and suggested running apm install in the package's directory. If it is necessary to use a file downloaded from GitHub repository like atom-beautify-0.30.3.tar.gz, it is necessary to run apm install in the package's directory before copying or moving into %HOMEDIRECTORY%%HOMEPATH%\.atom\package (~/.atom/package in case of *nix) of the offline computer.

  1. Decompress the file downloaded from GitHub repository like atom-beautify-0.30.3.tar.gz.

  2. Go into the directory like atom-beautify-0.30.3 of the decompressed result.

  3. Run apm install on an online computer. (If the directory of apm.cmd is not in PATH, run {directory of apm.cmd}\apm.cmd install.)

  4. Rename directory like atom-beautify-0.30.3 to the correct name of the package like atom-beautify.

  5. Move directory with the correct name of the package like atom-beautify into %HOMEDIRECTORY%%HOMEPATH%\.atom\packages of the offline computer.

  6. Run Atom Editor on the offline computer and check if the package works properly.

It seems normal that the directory node_modules is not included the the compressed file downloaded from GitHub repository.

Youngjin Jeon
  • 191
  • 2
  • 5