preview of stackblitz static html project ends in ENOENT error - html

I try to share a static html template project I made. But the Problem is that I end up with this error:
{"syscall":"","errno":2,"code":"ENOENT","path":"/var"}
The problem occurs when I open the preview link to the project. But if the html project is still open in the stackblitz editor in the background, it works. The problem also appears when you open a static html project from scratch and then want to open the preview with your cell phone, for example.
To narrow down the problem:
I am logged into stackblitz with my Github account. So I should be able to share my projects. The ENOENT error only appears with static html projects. It seems to me that it could also be a general problem, since the error also appears on newly created projects without any change.

Related

when people go to my website it shows all my files and not the landing page of my website -mclosed

when I go to my website directory it shows all my files and not to my landing page, is there a way to fix this? I have tried everything even looked through the internet without any clear response. I am close to finishing my website I only need to resolve this problem.
Thank you!
The issue seems to be that you are not on the HTML file, but on the folder.
To fix this issue, you have to redirect yourself to the HTML landing page.
/ar/home.html
This should show your HTML landing page correctly rendered.
Tip: Normally, the main page is called index.html by convention. This can be helpful. For example, the Live Server extension on Visual Studio Code will automatically go to index.html if the file isn't specified. Other hosting services, like GitHub Pages, also do the same.
None of the extensions, IDEs and hosting services listed above are sponsored! They are just used for the sole purpose of examples.
In conclusion, you need to go to the HTML file, instead of the folder.

The page is not reading my image and I don't know why

I finished my project, but although the extension Live Server is showing everything right, the images I added. When I open the page from the documents or from GitHub it is not reading SOME images. Does anyone recognize this error??
Ps: I'm just using HTML and CSS, making a portfolio.
I also faced the prob, what you need to do is just upload the folder again on Github using (Check wheter you are uploading the correct folder and the files are linked correctly.). And than again download it. It may solve the problem.

finding index.html on sidebar in visual studio code

Hi so I was trying to learn json for the first time and in the tutorial theres a section where you need to open index.html but that is not on my sidebar and I have absolutely no clue how to find/open it.
In the tutorial theres a drop down marked as "current project" which is not present on my screen and the index.html is in that. Is there an easy way to find where this is?
for anyone curious the tutorial im following is https://www.youtube.com/watch?v=iiADhChRriM and I saw at 6:43 it was there when he opened the program
this is my sidebar for reference
idk if im just dumb or my progam is being stupid but i need to find the answer so i can continue this project as soon as possible
Ok, so here is how the visual studio code side bar works, the first line you see (open editors) is a list of all open files, you don't have to pay mind to it,
but you can use it to find files you were editing earlier if you want.
The second line (physicsdemoassessment) is your current directory, there you can see all files on the directory.
This means that visual studio code is currently open on your old project, you say you didn't use it, but you probably opened vs code at some point on your project once, and vs code remembers.
You should make a new project to follow the tutorial. Go to File->Open Folder and pick a folder or make an empty folder and select it.
The reason why the tutorial's side bar says current project is because that is the name of the folder he's working on. so if you want to name your project that as well you should name the folder you open that.
Finally, to "find" the index.html file, as he explains in the video, this is just a very basic file, he made it before the tutorial started, it's not a vs code thing. You have to write the file yourself.
I hope my explanation was clear and solves your issue.

Cannot use Chrome Live Edit with Webpack source maps

I have a webpack 4 configuration that generates source maps for my app's JavaScript. While debugging my app in Chrome, the source maps get loaded so I can see my unimified code. I'll set a breakpoint in a function and in the Sources tab I'll make edits to the code. I hit CMD+S to save my edits.
Normally, I would expect Chrome to think for a little bit while it processes my edits and then I can continue debugging my session with my code changes.
But that doesn't happen. I get a little yellow icon next to my file in the Sources tab that says "Changes to this file were not saved to the filesystem". And the debugging session continues without my code changes.
I've tried different options like cheap-module-source-map and cheap-module-eval-source-map for the devtools option in my webpack config.
Any suggestions? Thanks!
I got something working!
I ended up posting my same question on reddit and got some help.
https://www.reddit.com/r/learnjavascript/comments/a98gh1/cannot_use_chrome_live_edit_with_webpack_source/
You need to add your project's directory to save changes in the
source.
Here are the steps:
Open dev tools
Click on the 3 vertical dots on the far-right beside X which brings up
a menu. Click on Settings
Click on Workspace
Add your Project's directory
Refresh the page, and you should be able to save your changes now.
Hope this helps.
Oddly enough, I was able to remove my Project's directory from the Workspace and STILL able to make Live Edits to my source maps!

Css file not loaded on first time, but available in browser when i manually open the css url

I am using gulp task in my project, and when i open the project in browser, sometimes it says app.css is not available, but when i enter the same css url to another tab it opens correctly. cant understand is it a gulp problem or some other.