This documentation is available as Markdown for AI agents and LLMs. See the full Markdown index or append .md to any documentation URL.
清除 Windows 上的 bundler 缓存
编辑页面
了解在 Windows 上使用 Expo CLI 或 React Native CLI 时,如何清除 Yarn 或 npm 的 bundler 缓存。
需要在 macOS 或 Linux 上清除开发缓存吗?在此查找相关命令。
与你的项目相关联的缓存有很多种,它们可能会阻止你的项目按预期运行。清除缓存有时可以帮助你绕过与过期或损坏数据相关的问题,并且在排查和调试时通常很有用。
Expo CLI 和 Yarn
Terminal
Expo CLI 和 npm
Terminal
React Native CLI 和 Yarn
Terminal
React Native CLI 和 npm
Terminal
这些命令在做什么
在运行你在网上找到的命令之前,先了解它们的作用是个好习惯。下面我们分别解释 Expo CLI、npm 和 Yarn 的每个命令,不过 React Native CLI 中对应的命令具有相同的行为。