Jekyll on windows continous regeneration

I’m running Jekyll on my windows machine (not by choice sadly) and when I launch the jekyll serve command I keep getting following output

even though I am not changing anything…I haven’t had this experience on any other OS. Any ideas what might be causing this? I tried looking for the file, it does not exist. I tried adding it to the exclude section of the _config.yml.

Puzzling.

Run Jekyll in verbose mode with a flag. Check the output build directory for that file

Clone a fresh repo and see if the problem happens there too

@amihaescu There’s a chance that your IDE (or text-editor perhaps) is adding a temporary file to your source.

I created a new one from scratch and got the exact same behavior. I didn’t open it in an editor.

With regard to the test repo made from scratch, are you seeing the same Regenerating … CV.TMP in the terminal output?

yes, it is exactly the same behavior.

these are my versions:
jekyll 4.0.1
ruby 2.6.6p146 (2020-03-31 revision 67876) [x64-mingw32]
Bundler version 2.1.4

Please exec the server in debug mode by running bundle exec jekyll serve --verbose and post the contents here.

bundle exec jekyll serve -V
Logging at level: debug
Jekyll Version: 4.0.1
Configuration file: C:/Users/andrei_mihaescu/gitwork/blog/_config.yml
Logging at level: debug
Jekyll Version: 4.0.1
Theme: minimal-mistakes-jekyll
Theme source: C:/Ruby26-x64/lib/ruby/gems/2.6.0/gems/minimal-mistakes-jekyll-4.19.2
Requiring: jekyll-paginate
Requiring: jekyll-sitemap
Requiring: jekyll-gist
Requiring: jekyll-feed
Requiring: jekyll-include-cache
Requiring: jekyll-paginate
Requiring: jekyll-sitemap
Requiring: jekyll-gist
Requiring: jekyll-feed
Requiring: jemoji
Requiring: jekyll-include-cache
Source: C:/Users/andrei_mihaescu/gitwork/blog
Destination: C:/Users/andrei_mihaescu/gitwork/blog/_site
Incremental build: enabled
Generating…
EntryFilter: excluded /Gemfile
EntryFilter: excluded /Gemfile.lock
EntryFilter: excluded /README.md
Reading: _posts/2019-01-08-welcome-to-jekyll.markdown
Reading: _posts/2019-01-09-jvm-jdk-jre-java.markdown
Reading: _posts/2019-01-14-testing-secured-endpoints.markdown
Reading: _posts/2019-06-22-microservices-in-thirty-minutes.markdown
Reading: _posts/2019-12-31-multiple-versions-java.md
Reading: _posts/2020-01-20-encapsulation.md
Reading: _posts/2020-03-15-abstraction.md
Reading: _posts/2020-05-14-inheritance.md
Generating: Jekyll::Paginate::Pagination finished in 0.0074916 seconds.
Generating: Jekyll::JekyllSitemap finished in 0.0015538 seconds.
Jekyll Feed: Generating feed for posts
Generating: JekyllFeed::Generator finished in 0.0033243 seconds.
Rendering: assets/css/main.scss
Pre-Render Hooks: assets/css/main.scss
Rendering Liquid: assets/css/main.scss
Rendering Markup: assets/css/main.scss
Rendering: assets/js/lunr/lunr-en.js
Pre-Render Hooks: assets/js/lunr/lunr-en.js
Rendering Liquid: assets/js/lunr/lunr-en.js
Rendering Markup: assets/js/lunr/lunr-en.js
Rendering Layout: assets/js/lunr/lunr-en.js
Rendering: assets/js/lunr/lunr-gr.js
Pre-Render Hooks: assets/js/lunr/lunr-gr.js
Rendering Liquid: assets/js/lunr/lunr-gr.js
Rendering Markup: assets/js/lunr/lunr-gr.js
Rendering Layout: assets/js/lunr/lunr-gr.js
Rendering: assets/js/lunr/lunr-store.js
Pre-Render Hooks: assets/js/lunr/lunr-store.js
Rendering Liquid: assets/js/lunr/lunr-store.js
Rendering Markup: assets/js/lunr/lunr-store.js
Rendering Layout: assets/js/lunr/lunr-store.js
Rendering: page2/index.html
Pre-Render Hooks: page2/index.html
Rendering Markup: page2/index.html
Rendering Layout: page2/index.html
Layout source: theme
Include cache miss: C:/Ruby26-x64/lib/ruby/gems/2.6.0/gems/minimal-mistakes-jekyll-4.19.2/_includes/skip-links.html
Include cache miss: C:/Ruby26-x64/lib/ruby/gems/2.6.0/gems/minimal-mistakes-jekyll-4.19.2/_includes/browser-upgrade.html
Include cache miss: C:/Ruby26-x64/lib/ruby/gems/2.6.0/gems/minimal-mistakes-jekyll-4.19.2/_includes/masthead.html
Include cache miss: C:/Ruby26-x64/lib/ruby/gems/2.6.0/gems/minimal-mistakes-jekyll-4.19.2/_includes/footer.html
Rendering: sitemap.xml
Pre-Render Hooks: sitemap.xml
Rendering Liquid: sitemap.xml
Rendering Markup: sitemap.xml
Rendering Layout: sitemap.xml
Rendering: robots.txt
Pre-Render Hooks: robots.txt
Rendering Liquid: robots.txt
Rendering Markup: robots.txt
Rendering Layout: robots.txt
Rendering: feed.xml
Pre-Render Hooks: feed.xml
Rendering Liquid: feed.xml
Rendering Markup: feed.xml
Rendering Layout: feed.xml
Rendering: assets/css/main.css.map
Pre-Render Hooks: assets/css/main.css.map
Rendering Liquid: assets/css/main.css.map
Rendering Markup: assets/css/main.css.map
Writing: C:/Users/andrei_mihaescu/gitwork/blog/_site/assets/css/main.css
Writing: C:/Users/andrei_mihaescu/gitwork/blog/_site/assets/js/lunr/lunr-en.js
Writing: C:/Users/andrei_mihaescu/gitwork/blog/_site/assets/js/lunr/lunr-gr.js
Writing: C:/Users/andrei_mihaescu/gitwork/blog/_site/assets/js/lunr/lunr-store.js
Writing: C:/Users/andrei_mihaescu/gitwork/blog/_site/page2/index.html
Writing: C:/Users/andrei_mihaescu/gitwork/blog/_site/sitemap.xml
Writing: C:/Users/andrei_mihaescu/gitwork/blog/_site/robots.txt
Writing: C:/Users/andrei_mihaescu/gitwork/blog/_site/feed.xml
Writing: C:/Users/andrei_mihaescu/gitwork/blog/_site/assets/css/main.css.map
Writing Metadata: .jekyll-metadata
done in 0.597 seconds.
Requiring: jekyll-watch
Watcher: Ignoring (?-mix:^_config.yml)
Watcher: Ignoring (?-mix:^_site/)
Watcher: Ignoring (?-mix:^Gemfile)
Watcher: Ignoring (?-mix:^.jekyll-cache/)
Watcher: Ignoring (?-mix:^Gemfile.lock)
Auto-regeneration: enabled for ‘C:/Users/andrei_mihaescu/gitwork/blog’
[2020-05-14 13:51:07] INFO WEBrick 1.4.2
[2020-05-14 13:51:07] INFO ruby 2.6.6 (2020-03-31) [x64-mingw32]
[2020-05-14 13:51:07] DEBUG WEBrick::HTTPServlet::FileHandler is mounted on /.
[2020-05-14 13:51:07] DEBUG unmount .
[2020-05-14 13:51:07] DEBUG Jekyll::Commands::Serve::Servlet is mounted on .
Server address: http://127.0.0.1:4000
[2020-05-14 13:51:07] INFO WEBrick::HTTPServer#start: pid=31424 port=4000
Server running… press ctrl-c to stop.
Regenerating: 1 file(s) changed at 2020-05-14 13:51:07
CY.TMP
EntryFilter: excluded /Gemfile
EntryFilter: excluded /Gemfile.lock
EntryFilter: excluded /README.md
Reading: _posts/2019-01-08-welcome-to-jekyll.markdown
Reading: _posts/2019-01-09-jvm-jdk-jre-java.markdown
Reading: _posts/2019-01-14-testing-secured-endpoints.markdown
Reading: _posts/2019-06-22-microservices-in-thirty-minutes.markdown
Reading: _posts/2019-12-31-multiple-versions-java.md
Reading: _posts/2020-01-20-encapsulation.md
Reading: _posts/2020-03-15-abstraction.md
Reading: _posts/2020-05-14-inheritance.md
Generating: Jekyll::Paginate::Pagination finished in 0.0025727 seconds.
Generating: Jekyll::JekyllSitemap finished in 0.0014079 seconds.
Jekyll Feed: Generating feed for posts
Generating: JekyllFeed::Generator finished in 0.000484 seconds.
Rendering: assets/css/main.scss
Pre-Render Hooks: assets/css/main.scss
Rendering Liquid: assets/css/main.scss
Rendering Markup: assets/css/main.scss
Rendering: assets/js/lunr/lunr-en.js
Pre-Render Hooks: assets/js/lunr/lunr-en.js
Rendering Liquid: assets/js/lunr/lunr-en.js
Rendering Markup: assets/js/lunr/lunr-en.js
Rendering Layout: assets/js/lunr/lunr-en.js
Rendering: assets/js/lunr/lunr-gr.js
Pre-Render Hooks: assets/js/lunr/lunr-gr.js
Rendering Liquid: assets/js/lunr/lunr-gr.js
Rendering Markup: assets/js/lunr/lunr-gr.js
Rendering Layout: assets/js/lunr/lunr-gr.js
Rendering: assets/js/lunr/lunr-store.js
Pre-Render Hooks: assets/js/lunr/lunr-store.js
Rendering Liquid: assets/js/lunr/lunr-store.js
Rendering Markup: assets/js/lunr/lunr-store.js
Rendering Layout: assets/js/lunr/lunr-store.js
Rendering: page2/index.html
Pre-Render Hooks: page2/index.html
Rendering Markup: page2/index.html
Rendering Layout: page2/index.html
Layout source: theme
Include cache miss: C:/Ruby26-x64/lib/ruby/gems/2.6.0/gems/minimal-mistakes-jekyll-4.19.2/_includes/skip-links.html
Include cache miss: C:/Ruby26-x64/lib/ruby/gems/2.6.0/gems/minimal-mistakes-jekyll-4.19.2/_includes/browser-upgrade.html
Include cache miss: C:/Ruby26-x64/lib/ruby/gems/2.6.0/gems/minimal-mistakes-jekyll-4.19.2/_includes/masthead.html
Include cache miss: C:/Ruby26-x64/lib/ruby/gems/2.6.0/gems/minimal-mistakes-jekyll-4.19.2/_includes/footer.html
Rendering: sitemap.xml
Pre-Render Hooks: sitemap.xml
Rendering Liquid: sitemap.xml
Rendering Markup: sitemap.xml
Rendering Layout: sitemap.xml
Rendering: robots.txt
Pre-Render Hooks: robots.txt
Rendering Liquid: robots.txt
Rendering Markup: robots.txt
Rendering Layout: robots.txt
Rendering: feed.xml
Pre-Render Hooks: feed.xml
Rendering Liquid: feed.xml
Rendering Markup: feed.xml
Rendering Layout: feed.xml
Rendering: assets/css/main.css.map
Pre-Render Hooks: assets/css/main.css.map
Rendering Liquid: assets/css/main.css.map
Rendering Markup: assets/css/main.css.map
Writing: C:/Users/andrei_mihaescu/gitwork/blog/_site/assets/css/main.css
Writing: C:/Users/andrei_mihaescu/gitwork/blog/_site/assets/js/lunr/lunr-en.js
Writing: C:/Users/andrei_mihaescu/gitwork/blog/_site/assets/js/lunr/lunr-gr.js
Writing: C:/Users/andrei_mihaescu/gitwork/blog/_site/assets/js/lunr/lunr-store.js
Writing: C:/Users/andrei_mihaescu/gitwork/blog/_site/page2/index.html
Writing: C:/Users/andrei_mihaescu/gitwork/blog/_site/sitemap.xml
Writing: C:/Users/andrei_mihaescu/gitwork/blog/_site/robots.txt
Writing: C:/Users/andrei_mihaescu/gitwork/blog/_site/feed.xml
Writing: C:/Users/andrei_mihaescu/gitwork/blog/_site/assets/css/main.css.map
Writing Metadata: .jekyll-metadata
…done in 0.5233522 seconds.

Regenerating: 1 file(s) changed at 2020-05-14 13:51:08
CY.TMP
EntryFilter: excluded /Gemfile
EntryFilter: excluded /Gemfile.lock
EntryFilter: excluded /README.md
Reading: _posts/2019-01-08-welcome-to-jekyll.markdown
Reading: _posts/2019-01-09-jvm-jdk-jre-java.markdown
Reading: _posts/2019-01-14-testing-secured-endpoints.markdown
Reading: _posts/2019-06-22-microservices-in-thirty-minutes.markdown
Reading: _posts/2019-12-31-multiple-versions-java.md
Reading: _posts/2020-01-20-encapsulation.md
Reading: _posts/2020-03-15-abstraction.md
Reading: _posts/2020-05-14-inheritance.md
[2020-05-14 13:51:08] DEBUG close TCPSocket(127.0.0.1, 4000)
[2020-05-14 13:51:08] INFO going to shutdown …
[2020-05-14 13:51:08] INFO WEBrick::HTTPServer#start done.

You seem to have incremental: true in your config file. Try changing it to false and restart the server.

I also tried that, but I got exactly the same behavior…

Then I guess you have to explicitly exclude CY.TMP from triggering a regen. In your config file, if there’s a key named exclude, add CY.TMP to the list under it. If not add it:

exclude:
- README.md
- CY.TMP

Also tried that…still the same…

I have tried searching for that file…but I got nothing…

The following is a hack

In your source directory, create a directory named _plugins.
Inside that directory, create a file named watcher-patch.rb and paste the following contents:

# frozen_string_literal: true

require 'jekyll-watch'

module Jekyll
  module Watcher
    extend self

    alias_method :original_listen_ignore_paths, :listen_ignore_paths

    def listen_ignore_paths(options)
      original_listen_ignore_paths(options) + [%r!.*\.TMP!i]
    end
  end
end

Then try restarting the Jekyll server.

I just tried it…if I do it as you suggested I get

C:/Ruby26-x64/lib/ruby/gems/2.6.0/gems/jekyll-watch-2.2.1/lib/jekyll/watcher.rb:100:in `listen_ignore_paths’: wrong number of arguments (given 0, expected 1) (ArgumentError)

If I remove the options argument I get

C:/Users/andrei_mihaescu/gitwork/blog/_plugins/watcher-patch.rb:11:in `listen_ignore_paths’: wrong number of arguments (given 1, expected 0) (ArgumentError)

Btw thank you for trying to help me.

Sorry. There’s a small typo.
It should have been original_listen_ignore_paths(options) instead. I’ve updated the code above.

Wow…that actually worked :smiley: thank you so much. You are a legend.

You’re welcome. However, it is only a temporary solution.
You may encounter the same error on a different jekyll site.