Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

ENOENT error after changing the html file #8571

Closed
filipcodes opened this issue Oct 23, 2022 · 9 comments · May be fixed by #8616
Closed

ENOENT error after changing the html file #8571

filipcodes opened this issue Oct 23, 2022 · 9 comments · May be fixed by #8616
Labels

Comments

@filipcodes
Copy link

🐛 bug report

Hey there people, first time using Parcel. There is this weird thing happening, where I can create the live server, but after changing the HTML, it shows up ENOENT error instead of automatically changing the dist/index.html and the content of the website.

🎛 Configuration (.babelrc, package.json, cli command)

This is my package.json. I am using npm start to get the server running.

{
  "name": "calculator_project",
  "version": "1.0.0",
  "description": "",
  "main": "index.js",
  "scripts": {
    "start": "parcel src/index.html",
    "build": "parcel build src/index.html"
  },
  "keywords": [],
  "author": "",
  "license": "ISC",
  "devDependencies": {
    "@parcel/transformer-sass": "^2.7.0",
    "parcel": "^2.7.0",
    "sass": "^1.55.0"
  }
}

🤔 Expected Behavior

Parcel should edit the dist/index.html and change the content on the live server

😯 Current Behavior

Parcel allows me to change the html once, and save it, but after that, saving the file results in the following error:

node:internal/fs/utils:345
    throw err;
    ^

Error: ENOENT: no such file or directory, unlink 'C:\Users\w\Desktop\projects\calculator_project\dist\index.html.9808.6'
    at Object.unlinkSync (node:fs:1735:3)
    at WriteStream.<anonymous> (C:\Users\w\Desktop\projects\calculator_project\node_modules\@parcel\fs\lib\index.js:1030:83)
    at Object.onceWrapper (node:events:642:26)
    at WriteStream.emit (node:events:539:35)
    at emitErrorNT (node:internal/streams/destroy:157:8)
    at emitErrorCloseNT (node:internal/streams/destroy:122:3)
    at processTicksAndRejections (node:internal/process/task_queues:83:21) {
  errno: -4058,
  syscall: 'unlink',
  code: 'ENOENT',
  path: 'C:\\Users\\w\\Desktop\\projects\\calculator_project\\dist\\index.html.9808.6'
}

🔦 Context

I am trying to learn using sass and parcel, as it is a real world technology being used by companies. I decided to do just a simple calculator.

💻 Code Sample

My HTML:

<!DOCTYPE html>
<html lang="en">
  <head>
    <meta charset="UTF-8" />
    <meta http-equiv="X-UA-Compatible" content="IE=edge" />
    <meta name="viewport" content="width=device-width, initial-scale=1.0" />
    <title>Scientific Calculator</title>
    <link rel="stylesheet" href="scss/main.scss" />
  </head>
  <body>
    <h1>Hello world</h1>
  </body>
</html>

my folder set up
obrázok

🌍 Your Environment

Software Version(s)
Parcel 2.7.0
Node Node.js v16.16.0.
npm/Yarn npm 8.11.0
Operating System Windows
@mischnic
Copy link
Member

mischnic commented Jan 7, 2023

Duplicate of #8615

@mischnic mischnic marked this as a duplicate of #8615 Jan 7, 2023
@mischnic mischnic closed this as not planned Won't fix, can't repro, duplicate, stale Jan 7, 2023
@andrew-rinato
Copy link

Dropbox file sync appeared to be the culprit for me.

@sung92
Copy link

sung92 commented Nov 23, 2023

I have been experiencing this same issue for the last 2 weeks, which never happened before. As soon as I change something in HTML, I got "ENOENT: no such file or directory" error.

@lllleao
Copy link

lllleao commented Mar 7, 2024

It happens the same with me. I can't modified the HTML, cause every single time parcel brokes

@filipcodes
Copy link
Author

filipcodes commented Mar 7, 2024 via email

@sung92
Copy link

sung92 commented Mar 7, 2024

Yeah, I happened to switch to Vite a couple of weeks and working fine.

@lllleao
Copy link

lllleao commented Mar 8, 2024

Thank guys. I realized what was wrong. There's a conflict with the autosave from VS code.

@vkthakur98
Copy link

How can I resolve this?

@abdallahmansour6
Copy link

Thank guys. I realized what was wrong. There's a conflict with the autosave from VS code.

Can you please elaborate what was the issue or the solution?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging a pull request may close this issue.

7 participants