1
0

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.

sudo create-react-appとしてストレスが溜まった話

Posted at

結論

これで直った。
npmがsudoでしか実行できない時の対処法

何がそんなにストレスか

sudo create-react-appってすると今後の作業全部にsudoしなきゃいけないです。
Screenshot from 2019-08-15 14-38-41.png
当然編集して保存するのもsudoですし何でもかんでもsudoです。
vscode使ってるとsu権限で起動するのオプションつけないといけないし、つけずにやると
ファイル作ったつもりがなんかできてないってファイルを探すためにfindとか打って探して何でないんだと20分悩みました。

解決方法

一番上の記事が参考です。
記事の手順を踏まない場合、create-react-appがsudoなしでは打てません。
なので記事の手順を踏み、sudoなしで色々できるようにしてください。
そうすれば全て解決します。Screenshot from 2019-08-15 14-43-42.png

sudoでcreate-react-appした後作成されたファイルの権限を変更すればいいだけでは?
ってツッコミは受け付けません。

終わり。

1
0
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
1
0

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?