Parcel: Auto-rebuild doesn't work with certain directory name

Created on 2 Oct 2018  路  11Comments  路  Source: parcel-bundler/parcel

馃悰 bug report


Auto-rebuild(Hot reload) doesn't work on the local development server opened by parcel serve command in some directory named like 'parksb.github.io'.

馃帥 Configuration (.babelrc, package.json, cli command)


parksb.github.io/package.json

{
  ...
  "scripts": {
    "serve": "parcel ./index.html",
    "build": "parcel build ./index.html",
  },
  ...
}

馃 Expected Behavior


After opening the web server using parcel ./public/index.html -d ./, Parcel should rebuild the development server automatically when I change files.

馃槸 Current Behavior


Parcel only opens the server and does not rebuild automatically.

馃拋 Possible Solution


I found that this issue related to the directory name. It occurred when the directory name was parksb.github.io and test.github.io, but it doesn't occur when the directory name was test, a.b.c and test.test.com.

馃捇 Code Sample


parksb.github.io/index.html

<!DOCTYPE html>
<html lang="en">
<head>
  <meta charset="UTF-8"/>
  <title>Document</title>
</head>
<body>
  <h1>Hello, world!</h1>
  <script src="./index.js"></script>
</body>
</html>

parksb.github.io/index.js

console.log('test');

馃實 Your Environment

| Software | Version(s) |
| ---------------- | ---------- |
| Parcel | 1.10.1
| Node | 8.11.3
| npm/Yarn | 6.4.1
| Operating System | WSL(Ubuntu 16.04 LTS) on Windows 10

Bug

Most helpful comment

can I please point out that the likely reason you guys think parcel is broken on ubuntu is that people reporting the issue on ubuntu are probably just building a github site...

All 11 comments

It seems like the issue is periods in the name.

As in: username.github.com doesn't work.

@jasonsturges Thank you :) May I know why parcel doesn't work with github domain?

Hi! I have the same issue. Is there a fix planned for that ? This is a very disapointing probem :(

I just realized this is a duplicate of my issue as well was not aware the folder name was the cause. This happens with parent folders as well so I assume any time there is this periods in the path name this happens. #2231

can I please point out that the likely reason you guys think parcel is broken on ubuntu is that people reporting the issue on ubuntu are probably just building a github site...

I have a similar configuration and the same problem but even without a github folder name:

  • Ubuntu 18.04.01 LTS
  • node 10.13.0 LTS
  • parcel 1.10.3

My folder path is: ~/projects/professional-website but I also tried ~/projects/test

The command that is run is parcel src/index.html. It builds once but never again even when index.html or any of its sub depencies are changed.

Very annoying and frustrating. :-/
Running chokidar src -c "echo Hello" works, so it must be something with parcel itself.

@ChristophP have you tried the usual fix of increasing max file watch limit?

@ChristophP if you have already tried that you should make a new issue.

This issue is still happening. I'm using parcel 1.11.0.

The fix for this has been merged so i'll close this it hasn't been released yet though

@RustyRaptor Where do you chage the max file watch limit? Parcel shows a build in terminal but the page doesn't autorefresh. Im in ubuntu here. I just have a folder called demoHtmlCss that it lives in so no periods

Was this page helpful?
0 / 5 - 0 ratings