简体   繁体   English

Visual Studio 代码实时服务器扩展错误

[英]Visual studio code live server extension Error

I'm having a really frustrating problem that I cannot solve.我遇到了一个我无法解决的非常令人沮丧的问题。 I have used VS code and have been able to open my files with live server extension but starting yesterday I was unable to use it without the error " Error: ENOTDIR: not a directory, stat '/home/kanwchan/rockpaperscissors/index.html/' " Now the odd part is I attempted to open a different index.html file and when I used live server extension on that file it opened the previous page without any error.我已经使用了 VS 代码并且能够使用实时服务器扩展打开我的文件,但是从昨天开始我无法使用它而不出现错误“错误:ENOTDIR:不是目录,stat '/home/kanwchan/rockpaperscissors/index.html /' " 现在奇怪的是我试图打开一个不同的 index.html 文件,当我在那个文件上使用实时服务器扩展时,它打开了上一页,没有任何错误。 I am doing this all inside of a virtual machine (Oracle VM Virtual box manager).我在虚拟机(Oracle VM 虚拟机管理器)中执行所有这些操作。 I'm brand new and I would like to try to resolve the issue without having to completely delete everything and restart.我是全新的,我想尝试解决问题,而不必完全删除所有内容并重新启动。

I had the same problem as a beginner.我和初学者有同样的问题。 The thing is, the live server extension works when we open a folder/directory, not when we open just file/files.问题是,实时服务器扩展在我们打开文件夹/目录时起作用,而不是在我们只打开文件/文件时起作用。 So open the folder containing the files with VS Code and try to open it.因此,使用 VS Code 打开包含文件的文件夹并尝试打开它。 If it's not resolved, let me know.如果还没有解决,请告诉我。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM