[英]Svelte Serving Wrong Project
I created a new svelte project, opened the new directory in visual studio code and when I run npm run dev
in the terminal and open my web browser, the project I see isn't the one I just created its one I previously worked on.我创建了一个新的 svelte 项目,在 Visual Studio 代码中打开了新目录,当我在终端中运行npm run dev
并打开我的 web 浏览器时,我看到的项目不是我刚刚创建的那个我以前工作过的项目。
So my initial reaction was to delete the previous project, as it wasn't important, then ran the command again and to my surprise the project that no longer exist is still being served at the address.所以我最初的反应是删除之前的项目,因为它并不重要,然后再次运行命令,令我惊讶的是,不再存在的项目仍在该地址提供服务。 I've restarted my system and so on.我已经重新启动了我的系统等等。
Does anyone know why this might be happening?有谁知道为什么会发生这种情况?
This is normal - it got cached.这是正常的——它被缓存了。 Assuming you're using Chrome: Open the developer tools (F12, or three dots -> more tools -> developer tools), go to Application, Clear storage, and Clear site data.假设您使用的是 Chrome:打开开发者工具(F12,或三个点 -> 更多工具 -> 开发者工具),go 到应用程序,清除存储和清除站点数据。 Then, reload the page.然后,重新加载页面。
If this doesn't work, press Ctrl+F5 (Cmd+Shift+R on macOS).如果这不起作用,请按 Ctrl+F5(在 macOS 上为 Cmd+Shift+R)。
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.