简体   繁体   English

Svelte 服务错误的项目

[英]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.

相关问题 svelte:在错误的按钮上触发了点击事件 - svelte: click event triggered on wrong button 使用 express 在本地为项目提供服务 - serving a project locally using express 如何在 svelte 项目中配置 sass 和 ESLint? - How to configure sass and ESLint in svelte project? 如何将 Sapper 添加到现有的 Svelte 项目中? - How to add Sapper to existing Svelte project? 如何将 Svelte 组件导入 vanilla JS 项目,而不将 Svelte 添加为该父项目的依赖项? - How to import Svelte component into vanilla JS project, without adding Svelte as a dependency to that parent project? 为什么animejs 在构建svelte-kit 骨架项目时抛出这个错误? - Why is animejs throwing this error on build in the svelte-kit skeleton project? 如何设置 Svelte 项目以从 TS 导入组件? - How to setup Svelte project for importing component from TS? AWS Cloudfront 将 javascript 模块作为错误的 MIME 类型(“Text/Plain”)提供服务 - AWS Cloudfront serving javascript modules as wrong MIME type( "Text/Plain") 为 Angular 项目的 index.html 文件提供服务的 Python (Flask) - Python (Flask) serving Angular project's index.html file Laravel 项目正在调用错误的路径 - Laravel project is calling the wrong paths
 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM