首页 > 解决方案 > 在 Google Drive File 流上使用 NPM 安装

问题描述

我正在开发 Node.js 应用程序。

我将所有文件保存在 Google Drive File Stream 上,效果很好。

但是当尝试在终端中安装一些带有 NPM 的包时,它会出错。

也许 VS Code 上的终端无法在 Google DFS 中创建新目录。

npm WARN tar TAR_ENTRY_ERROR UNKNOWN: unknown error, write
npm WARN tar TAR_ENTRY_ERROR UNKNOWN: unknown error, write
npm ERR! cb() never called!

npm ERR! This is an error with npm itself. Please report this error at:
npm ERR!     <https://github.com/npm/cli/issues>

npm ERR! A complete log of this run can be found in:
npm ERR!     C:\Users\username\AppData\Local\npm-cache\_logs\2021-01-05T00_13_21_425Z-debug.log

我可以在我的本地驱动器文件夹中执行此操作,然后将其再次复制到 DFS,但这有点烦人。

有什么办法可以解决吗?

标签: node.jsnpmgoogle-drive-file-stream

解决方案


  1. 我正在使用Google 云端硬盘桌面应用程序。只有我保存了我所有的代码。

  2. 当我安装 python-shell npm 包时。我发现,里面的空文件-> 路径node_modules/python-shell

  3. 所以我复制了我的代码的整个文件夹并将其保存在桌面中(我的意思是你可以将文件保存在本地)

然后我正确安装了 python-shell 包


推荐阅读