Reputation: 41
Google Drive for desktop : Firstly, I'm using 'Google Drive for desktop' (formally called Google Drive Filestream) which gives me a G: where I can access all my Google Drive Files and Folders from my computer without Internet connection : https://support.google.com/a/users/answer/9965580?hl=en
Essentially, the desktops on all our computers are set to this same G: drive so we can hop on any of our five computers, and start working exactly where we left off from any computer, and all desktop files and folders are changed in sync.
Node JS :
When in the Hyper command prompt, within G:, I've created the index.js file within a project folder and then initialized npm with npm init
. This created the following package.json
file inside the project folder:
{
"name": "nodejs",
"version": "1.0.0",
"description": "intro to node",
"main": "index.js",
"scripts": {
"test": "echo \"Error: no test specified\" && exit 1"
},
"author": "me",
"license": "ISC"
}
But, when I try to use npm install, for example: npm install superheroes
from https://www.npmjs.com/package/superheroes I get the following errors:
npm ERR! code EEXIST
npm ERR! syscall mkdir
npm ERR! path G:\My Drive\NodeJS\node_modules\.staging
npm ERR! errno -4075
npm ERR! EEXIST: file already exists, mkdir 'G:\My Drive\NodeJS\node_modules\.staging'
npm ERR! File exists: G:\My Drive\NodeJS\node_modules\.staging
npm ERR! Remove the existing file and try again, or run npm
npm ERR! with --force to overwrite files recklessly.
npm ERR! A complete log of this run can be found in:
npm ERR! C:\Users\<my_user_name>\AppData\Roaming\npm-cache\_logs\2021-05-17T01_14_42_782Z-debug.log
There is a similar post here: How to make a node.js project in Google Drive Filestream
I've tried removing the space in the path file name My Drive
thinking this might be causing the 4075 error but was unsuccessful.
I know this is not recommended practice, as most will use Git Hub in this situation, but is it possible?
Thank you!
Upvotes: 4
Views: 2497
Reputation: 5744
it is possible for force an install with the --force
flag.
so this will work:
npm install package_name --force.
With the above, there is no need for workarounds that include the physical computer.
Here is a link to the solution which works: npm install mathjs throws an error message
Upvotes: 0
Reputation: 1
As far as I can tell, npm install
does not work within G:\My Drive. The solution I use is not elegant, but the cost is outweighed by the benefit of having my work files synced between my computers and always being backed up by Google Drive.
The work around I use is to:
npm init
and npm install
my packages into that folder.Upvotes: 0
Reputation: 539
This issue was resolved by placing the project folder on my computer's drive (desktop, C:, wherever), then just include that folder in the drive sync list of folders.
It seems that there's an issue having git/node write to a Google Drive for Desktop drive, but it works just fine to store the project locally and mirror that folder to Drive.
Upvotes: 2
Reputation: 21
Hi i had the same problem and the solution is pretty simple, i recommend you to create a remote repository in your google drive folder and clone it in your computer folders, of course you should have the repository folder in your local Google Drive. you can initializate your remote repository with git init --bare i let you here a very simple tutorial
Upvotes: 2