I have a web app located under C:\Google-drive\vue-app
. Running yarn build
command will install node_modules folder in C:\Google-drive\vue-app
. I am using Google Drive to sync my web app source code to Google cloud. The problem I am facing is the thousands of files in node_modules will crash Google Drive.
Is there some way to configure package.json to install node_modules folder outside of C:\Google-drive\vue-app
and have it installed in a location called C:\temp\node_storage
?
I am open to any solution that can stop Google Drive from syncing node_modules folder. It need not necessarily involve configuring package.json
I found a solution to my question. Not satisfactory but it works.
Use FreeFileSync application. This free app allows the user to select folders to sync to Google Drive. The user can select the source code folders to sync to Google Drive, excluding node_modules folder.
For more convenience, there is a real-time sync feature in this app. It requires some configuration. I have not tested it. If this real-time sync feature is not enabled, then manual syncing is required.