LoginSignup
4
2

More than 3 years have passed since last update.

iCloud Driveからnode_modulesを除外する

Last updated at Posted at 2020-05-31

iCloud Driveのアップロードが止まらない

Vuejsとかの開発をiCloud Driveに入れて開発すると、npm installした途端node_modulesフォルダのiCloud Driveのバックアップに物凄い時間がかかって困る。

そもそもバックアップされたくないし、する必要もないと思うので、なんとかして除外したい。

参考:Prevent iCloud from Syncing /node_modules/ Folder

npm install
mv node_modules node_modules.nosync
ln -s node_modules.nosync/ node_modules

npm install したらすぐにフォルダの名前変えて、node_modulesっていうシンボリックリンクで紐づけるって形。

私の環境だと、gitあたりがindex付けようとしたので、ローカルのグローバル無視リストにnode_modules.nosyncを追加
Visual Studio CodeのSFTPプラグインもアップロードしたそうにしてたのでignoreに追加。

ただ、iCloud Driveは.gitフォルダーは保存してくれないので、結局gitとTimeMachineとiCloud Driveでトリプル保存になりましたとさ。

4
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
4
2