如何解决使用 G:Google Drive for desktop for Node JS 项目npm 安装错误
桌面版 Google 云端硬盘: 首先,我使用的是“Google Drive for desktop”(正式名称为 Google Drive Filestream),它给了我一个 G: 我可以在没有互联网连接的情况下从我的计算机访问我的所有 Google Drive 文件和文件夹:https://support.google.com/a/users/answer/9965580?hl=en>
基本上,我们所有计算机上的桌面都设置为相同的 G: 驱动器,因此我们可以跳上我们的五台计算机中的任何一台,并从任何计算机上离开的地方开始工作,并且所有桌面文件和文件夹都已更改同步。
节点JS:
在 Hyper 命令提示符下,在 G: 中,我在项目文件夹中创建了 index.js 文件,然后使用 npm init
初始化了 npm。这在项目文件夹中创建了以下 package.json
文件:
{
"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"
}
但是,当我尝试使用 npm install 时,例如:npm install superheroes
from https://www.npmjs.com/package/superheroes 我收到以下错误:
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
这里有一个类似的帖子:How to make a node.js project in Google Drive Filestream
我曾尝试删除路径文件名 My Drive
中的空格,认为这可能会导致 4075 错误,但未成功。
我知道这不是推荐的做法,因为在这种情况下大多数人会使用 Git Hub,但有可能吗?
谢谢!
版权声明:本文内容由互联网用户自发贡献,该文观点与技术仅代表作者本人。本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。如发现本站有涉嫌侵权/违法违规的内容, 请发送邮件至 dio@foxmail.com 举报,一经查实,本站将立刻删除。