21

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!

4 Answers 4

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.

4
  • Isn't it apm install?
    – brandito
    Commented Jul 18, 2018 at 1:20
  • @Brandito no this is correct. apm install will install a package from the main atom repo Commented Nov 14, 2018 at 12:20
  • 4
    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!
    – Nick Briz
    Commented Feb 25, 2023 at 0:16
  • 2
    This is the only way to install packages now.
    – kontextify
    Commented Jul 14, 2023 at 4:44
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.

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." Commented Aug 22, 2016 at 16:48
  • 1
    @PrameshBajracharya You did not specify you are using Windows and he assumed you were not. This all becomes more complicated on Windows. Commented Aug 23, 2016 at 11:43
  • oops yea right! I forgot to mention windows. Any solution? Commented Aug 23, 2016 at 14:02
  • 2
    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 commandline
    – D3181
    Commented Aug 23, 2016 at 14:13
  • 1
    edit :: Finally this way worked! Using apm install <packagename> did all my installs. Thank you very much. Commented Aug 24, 2016 at 18:17
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
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.

1
  • 4
    And how is this different from @Pao 's answer? Commented Dec 31, 2017 at 8:32

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.