在 OneDrive 上开发 React 项目时出现同步问题

发布于 2025-01-11 21:52:59 字数 706 浏览 0 评论 0原文

我在 Windows 10 上的 OneDrive 文件夹中使用 npx create-react-app 创建了一个 React 项目。OneDrive

抱怨其中一个文件夹被命名为“~”(这是一个包含由 create-react-app 自动创建的 Node 配置文件的文件夹) 。

老实说,这真是一场巨大的噩梦:

  • 我自己无法重命名、移动或删除该文件夹。 Windows 资源管理器不允许这样做,因为存在“同步错误”,
  • OneDrive 将完全停止同步,直到问题得到解决。我无法手动执行任何操作,因此我唯一的选择是使用错误消息中的“重命名”按钮(这应该会自动重命名文件并修复错误)。这不起作用。我在几天内一次又一次地尝试,但什么也没做,错误仍然存​​在。
  • 最终我将项目复制到 OneDrive 之外,但现在无法删除旧文件夹。我尝试了我能想到的一切:暂停同步,尝试在Windows安全模式下删除它们,最后卸载OneDrive。我设法删除了大部分内容(费了很大的力气),但仍然有一些 Node 目录无法删除。我遇到了“重新分析点缓冲区”错误,我通过运行 chkdsk /f /x 解决了该错误

,部分原因是,我发布此内容希望我的经验能够帮助那些在 OneDrive 上遇到类似问题的人,但我也想知道如何保持在我的 OneDrive 中响应项目。

我喜欢将笔记本电脑上的所有内容都放在 OneDrive 文件夹中,以便进行同步:我希望在移动到计算机时能够继续我的工作。

I made a React project using npx create-react-app inside my OneDrive folder on Windows 10.

OneDrive complained about one of the folders being named '~' (it was a folder with Node config files made automatically by create-react-app).

This was honestly a huge nightmare:

  • I could not rename, move or delete the folder myself. Windows Explorer didn't allow it because there was a 'sync error'
  • OneDrive would just completly stop syncing until the issue is fixed. I could not do anything manually, so my only option was to use their 'rename' button in the error message (which is supposed to automatically rename the file and fix the error). This did not work. I would try again and again over the span of a few days and it would do nothing, the error persisted.
  • Ultimately I copied my project outside OneDrive, but now I wasn't able to delete my old folders. I tried everything I could think of: pause sync, try to delete them with Windows in Safe Mode, uninstalled OneDrive in the end. I managed to delete most of the contents (with a lot of effort), but there were stil some Node directories that would not be deleted. I was getting a 'reparse point buffer' error which I solved by running chkdsk /f /x

Partly, I'm posting this hoping that my experience would help someone that has simmilar issues with OneDrive, but I also want to know how to keep React projects in my OneDrive.

I like having everything on my laptop in my OneDrive folder so it is synced: I want to be able continue my work when I move to my computer.

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(1

巴黎盛开的樱花 2025-01-18 21:52:59

我遇到了完全相同的问题。我想知道是否将反应文件夹移动到另一个文件夹中,然后删除另一个有效的文件夹尝试一下。我的 onedrive 仍然尝试同步某些内容一段时间,但最终退出,现在一切正常。直到我做另一个反应项目,onedrive 肯定会再次搞砸。

删除文件夹后按 Window + R 并运行此命令以重置 onedrive

%localappdata%\Microsoft\OneDrive\onedrive.exe /reset

I'm having the exact same problem. I figured out if I moved the react folder into another folder and then deleted the other folder that worked try it. My onedrive still kept trying to sync something for a while but it finally quit and now everything is okay. That is until I do another react project and onedrive will be messed up again for sure.

After deleting the folder press Window + R and run this command to reset onedrive

%localappdata%\Microsoft\OneDrive\onedrive.exe /reset
~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文