6
6

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?

More than 5 years have passed since last update.

yoでAngularJSのテンプレートを生成するときに「Error: Attempt to unlock *, which hasn't been locked」とエラーが表示されるとき

Last updated at Posted at 2014-07-08

原因は.npmへアクセスする権限がないユーザで利用しているためでした。
(ちなみにyoコマンドはsudoが利用できません。ターミナル内で怒られます。)

解消方法は以下の通り。(ユーザホームに.npmがある場合です)

bash
cd ~
sudo chown -R ユーザ名 .npm

無事ひな形が生成できました!

6
6
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
6
6

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?