简体   繁体   English

如何修复 VsCode 中显示 Enotdir: not a directory, stat 的 html 错误代码?

[英]How to fix html error code in VsCode that says Enotdir: not a directory, stat?

I am very new to web development and I am starting my first project using frontendmentor.io.我对 Web 开发非常陌生,我正在使用 frontendmentor.io 开始我的第一个项目。 I began my project Monday and everything was working fine.我星期一开始了我的项目,一切正常。 All of a sudden on Tuesday, I began to get a error message when trying to open live server.突然在星期二,我在尝试打开实时服务器时开始收到错误消息。

The error message reads:错误消息如下:
Error: ENOTDIR: not a directory, stat '/Users/username/html/index.html/'

I have searched plenty of forums and cannot really find anything that fits my situation.我搜索了很多论坛,并没有真正找到适合我情况的任何内容。 I am using only HTML and CSS for this project.我在这个项目中只使用 HTML 和 CSS。 I uninstalled VSCode and I lost all of my previous work, so I only have the code that frontendmentor provided to get started, but I can post that below if needed.我卸载了 VSCode,并且丢失了我以前的所有工作,所以我只有前端提供的开始使用的代码,但如果需要,我可以在下面发布。 I am sure I did something wrong, I just cannot figure out what exactly.我确定我做错了什么,我只是无法弄清楚到底是什么。

I had that problem too.我也有这个问题。
I opened the CSS file with live server instead of index.html file and it works.我用实时服务器而不是index.html文件打开了 CSS 文件,它可以工作。

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

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