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

4

20

Due to poor internet connection my atom packages won’t install from settings>preferences>install>packages. So I think I need to manually install them.

For example: I tried the repository from respective github page and cloned it in users>.atom>packages but this didn't work.

Any help? I love this text editor so it would be pretty handy if I could install more packages manually.

Any other ways are always welcome!

Zelikow answered 22/8, 2016 at 14:20 Comment(0)
E
7

There are a few ways, most are similar to this :

You can download the package, unzip or decompress, go to that folder and run: apm link that will create a symbolic link from that package to your ~/.atom/packages folder.

But ensure that you install all dependencies require by the package also, as if you dont have internet connection then you may encounter issues.

There some good information here i will quote for your convenience that outlines how to handle this :

When you manually download and extract the zip file you need to run apm install in the package's directory afterwards to pull in any dependencies. This will download all dependencies and place them in the node_modules folder and recursively pulls in their dependencies as well. Since this is not possible in your environment, you'll have to do that manually.

Recursively go over each package.json file. If it lists a package as a dependency search on npm6 for the package and follow the link to package's github page to read its package.json and repeat the whole process.

Hope this helps in anyway. Lemme know if i can help further once you have tried.

Etz answered 22/8, 2016 at 14:29 Comment(6)
I'm a beginner so can you please guide me through the apm part .. Is it done through opening command line (shift + left mouse click and open command window here)? If yes then it shows " 'apm' is not recognized as an internal or external command. @Dean219 operable program or batch file."Zelikow
@PrameshBajracharya You did not specify you are using Windows and he assumed you were not. This all becomes more complicated on Windows.Chirr
oops yea right! I forgot to mention windows. Any solution?Zelikow
According to most online documentation APM should be provided by default as a command after installing, but if its not you should be able to go to the directory from your commandline and run apm, it will usually be in the directory : C:\Users\yourUserName\AppData\Local\atom\bin on windows. Once there you should in theory be able to follow the guide posted above but let me know once you have fixed your APM missing command issue. Also you should look into adding the directory with the APM.cmd etc into your environment variables to make things easier from commandlineEtz
@Dean219 Thank you for your help! The apm command seem to be working in the directory (C:\Users\myUserName\AppData\Local\atom\bin) only . After I do apm install atom-beautify on the very directory it seems that it tries to install the package in it's original directory(ie. C:\Users\myUserName\.atom\packages). I'm currently trying to install some of the packages and will let you know if any progress is done. Thank you.Zelikow
edit :: Finally this way worked! Using apm install <packagename> did all my installs. Thank you very much.Zelikow
P
31

In linux:

cd ~/.atom/packages
git clone https://github.com/url_to_your_package
cd your_package
npm install

You have to install npm first.

Pederasty answered 9/10, 2016 at 8:13 Comment(4)
Isn't it apm install?Distal
@Brandito no this is correct. apm install will install a package from the main atom repoSketchbook
this worked for me! for folks reading in 2023++, now that Atom has been "sunset" apm no longer works (at least not for me) but cloning from git does!Wolters
This is the only way to install packages now.Landrum
E
7

There are a few ways, most are similar to this :

You can download the package, unzip or decompress, go to that folder and run: apm link that will create a symbolic link from that package to your ~/.atom/packages folder.

But ensure that you install all dependencies require by the package also, as if you dont have internet connection then you may encounter issues.

There some good information here i will quote for your convenience that outlines how to handle this :

When you manually download and extract the zip file you need to run apm install in the package's directory afterwards to pull in any dependencies. This will download all dependencies and place them in the node_modules folder and recursively pulls in their dependencies as well. Since this is not possible in your environment, you'll have to do that manually.

Recursively go over each package.json file. If it lists a package as a dependency search on npm6 for the package and follow the link to package's github page to read its package.json and repeat the whole process.

Hope this helps in anyway. Lemme know if i can help further once you have tried.

Etz answered 22/8, 2016 at 14:29 Comment(6)
I'm a beginner so can you please guide me through the apm part .. Is it done through opening command line (shift + left mouse click and open command window here)? If yes then it shows " 'apm' is not recognized as an internal or external command. @Dean219 operable program or batch file."Zelikow
@PrameshBajracharya You did not specify you are using Windows and he assumed you were not. This all becomes more complicated on Windows.Chirr
oops yea right! I forgot to mention windows. Any solution?Zelikow
According to most online documentation APM should be provided by default as a command after installing, but if its not you should be able to go to the directory from your commandline and run apm, it will usually be in the directory : C:\Users\yourUserName\AppData\Local\atom\bin on windows. Once there you should in theory be able to follow the guide posted above but let me know once you have fixed your APM missing command issue. Also you should look into adding the directory with the APM.cmd etc into your environment variables to make things easier from commandlineEtz
@Dean219 Thank you for your help! The apm command seem to be working in the directory (C:\Users\myUserName\AppData\Local\atom\bin) only . After I do apm install atom-beautify on the very directory it seems that it tries to install the package in it's original directory(ie. C:\Users\myUserName\.atom\packages). I'm currently trying to install some of the packages and will let you know if any progress is done. Thank you.Zelikow
edit :: Finally this way worked! Using apm install <packagename> did all my installs. Thank you very much.Zelikow
H
3

Option 1: use the atom package manager (apm)

From the command line:

apm install <github repo link>

Where the github link is the same link you'd normally use to clone the repository.

apm install documentation

$ apm help install

Usage: apm install [<package_name>...]
       apm install <package_name>@<package_version>
       apm install <git_remote>
       apm install <github_username>/<github_project>
       apm install --packages-file my-packages.txt
       apm i (with any of the previous argument usage)

Install the given Atom package to ~/.atom/packages/<package_name>.

If no package name is given then all the dependencies in the package.json
file are installed to the node_modules folder in the current working
directory.

A packages file can be specified that is a newline separated list of
package names to install with optional versions using the
`package-name@version` syntax.

Options:
  --check           Check that native build tools are installed                            [boolean]
  --verbose         Show verbose debug information                        [boolean] [default: false]
  --packages-file   A text file containing the packages to install                          [string]
  --production      Do not install dev dependencies                                        [boolean]
  -c, --compatible  Only install packages/themes compatible with this Atom version          [string]
  -h, --help        Print this usage message
  -s, --silent      Set the npm log level to silent                                        [boolean]
  -q, --quiet       Set the npm log level to warn                                          [boolean]

  Prefix an option with `no-` to set it to false such as --no-color to disable
  colored output.

Option 2: Download manually

The following seemed to work for me on MacOS

cd ~/.atom/packages
git clone https://github.com/url_to_your_package
cd your_package
apm install
  • note apm not npm
Harwilll answered 22/4, 2022 at 4:50 Comment(0)
F
2

to get npm, juste install the node.js, automatically npm will be installed,then run:

cd ~/.atom/packages

git clone https://github.com/package-name your_package
cd your_package
npm install

and it's done.

Freetown answered 31/12, 2017 at 4:13 Comment(1)
And how is this different from @Pao 's answer?Zelikow

© 2022 - 2024 — McMap. All rights reserved.