LoginSignup
2
2

More than 5 years have passed since last update.

Atomをバージョンアップしたらapmコマンドが通らなくなった

Last updated at Posted at 2016-10-13

何が起こった

Windowsです。
Atomの自動更新をONにしていて、いつの間にか1.10.1から1.11.1にバージョンアップしていたらしいが、apmコマンドを打とうとしたら

/c/Users/hogehoge/AppData/Local/atom/bin/apm: line 2: /c/Users/hogehoge/AppData/Local/atom/bin/../app-1.10.1/resources/cli/apm.sh: No such file or directory

って言われた。
環境変数でパスを1.11.1にしても治らなくて少し焦る。

修正

/c/Users/hogehoge/AppData/Local/atom/bin/apmが悪さをしていそうなので開く。

\#!/bin/sh
"$(dirname "$0")/../app-1.10.1/resources/cli/apm.sh" "$@"

バージョンを修正する。

\#!/bin/sh
"$(dirname "$0")/../app-1.11.1/resources/cli/apm.sh" "$@"

ついでに/c/Users/hogehoge/AppData/Local/atom/bin/atomも修正しておく。

\#!/bin/sh
"$(dirname "$0")/../app-1.10.1/resources/cli/atom.sh" "$@"
echo

\#!/bin/sh
"$(dirname "$0")/../app-1.11.1/resources/cli/atom.sh" "$@"
echo

これでapmコマンドもatomコマンドも使える。

$ apm -v
apm  1.12.5
npm  3.10.5
node 4.4.5
python 2.7.12
git 2.7.2.windows.1

おっけい。

2
2
0

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
2
2