简体   繁体   中英

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

Due to poor inte.net 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!

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.

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.

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.

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

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM