decaporg / gatsby-starter-decap-cms

Example Gatsby + Decap CMS project
https://gatsby-netlify-cms.netlify.app/
MIT License
2.06k stars 982 forks source link

*long hot reload times*: Critical dependency: the request of a dependency is an expression, [webpack-dev-middleware] wait until bundle finished: #914

Closed hktari closed 3 months ago

hktari commented 3 months ago

Describe the bug

I'm experiencing long hot reload times as well as browser unresponsiveness when updating my style sheets. At times I think it fails completely. In short my development build is unpleasant to work with to say the least.

To Reproduce Steps to reproduce the behavior.

  1. git clone https://github.com/hktari/fictional-succotash
  2. npm run develop
  3. make a change inside _bootstrap-config.scss

Expected behavior

browser should display changes made to stylesheets in real time

Screenshots

Applicable Versions:

CMS configuration

https://github.com/hktari/fictional-succotash/blob/staging/static/admin/config.yml

Package.json https://github.com/hktari/fictional-succotash/blob/staging/package.json

gatsby-config.js https://github.com/hktari/fictional-succotash/blob/staging/gatsby-config.js

Additional context

info changed file at /home/hktari/source/zdrava-rutina/src/pages/index.md warn ./node_modules/gatsby-plugin-decap-cms/gatsby-browser.js [03:38:06] Critical dependency: the request of a dependency is an expression success Re-building development bundle - 22.300s success Writing page-data.json files to public directory - 0.116s - 1/7 60.38/s success building schema - 0.215s success createPages - 0.030s info Total nodes: 143, SitePage nodes: 8 (use --verbose for breakdown) success Checking for changed pages - 0.002s success onPreExtractQueries - 0.001s success extract queries from components - 0.094s success write out requires - 0.002s success Writing page-data.json files to public directory - 0.009s - 0/6 678.35/s success onPreExtractQueries - 0.001s success extract queries from components - 0.116s success write out requires - 0.001s success run page queries - 0.128s - 1/1 7.82/s success Writing page-data.json files to public directory - 0.005s - 1/6 [03:38:59] 1132.37/s WAIT Compiling...3:47:01 AM ⠀ success onPreExtractQueries - 0.001s success extract queries from components - 0.093s success write out requires - 0.001s [03:47:02] WARNING Compiled with 1 warning3:48:22 AM ⠀ warning in ./node_modules/gatsby-plugin-decap-cms/gatsby-browser.js ⠀ Critical dependency: the request of a dependency is an expression ⠀ WAIT Compiling...3:48:22 AM ⠀ warn ./node_modules/gatsby-plugin-decap-cms/gatsby-browser.js [03:48:22] Critical dependency: the request of a dependency is an expression success Re-building development bundle - 80.695s success Writing page-data.json files to public directory - 0.031s - 0/5 161.52/s success onPreExtractQueries - 0.001s [03:48:23] [webpack-dev-middleware] wait until bundle finished: /commons.js [webpack-dev-middleware] wait until bundle finished: /commons.css [webpack-dev-middleware] wait until bundle finished: /page-data/app-data.json [webpack-dev-middleware] wait until bundle finished: /page-data/index/page-data.json [webpack-dev-middleware] wait until bundle finished: /page-data/404.html/page-data.json success extract queries from components - 0.100s success write out requires - 0.001s warn Warning: Event "xstate.after(200)#waitingMachine.aggregatingFileChanges" [03:48:57] was sent to stopped service "waitingMachine". This service has already reached [03:48:57] its final state, and will not transition. [03:48:57] Event: {"type":"xstate.after(200)#waitingMachine.aggregatingFileChanges"} [03:48:57] [webpack-dev-middleware] wait until bundle finished: /page-data/sq/d/229118374.json WARNING Compiled with 1 warning3:49:41 AM ⠀ warning in ./node_modules/gatsby-plugin-decap-cms/gatsby-browser.js ⠀ Critical dependency: the request of a dependency is an expression ⠀ warn ./node_modules/gatsby-plugin-decap-cms/gatsby-browser.js [03:49:41] Critical dependency: the request of a dependency is an expression success Re-building development bundle - 44.393s success Writing page-data.json files to public directory - 0.037s - 0/5 133.60/s [03:49:41]

[webpack.cache.PackFileCacheStrategy] Caching failed for pack: Error: ENOENT: no such file or directory, rename '/home/hktari/source/zdrava-rutina/.cache/webpack/stage-develop/5.pack_' -> '/home/hktari/source/zdrava-rutina/.cache/webpack/stage-develop/5.pack'
martinjagodic commented 3 months ago

This seems unrelated to Decap, so I'm closing the issue. If it is, please explain how to reproduce.

hktari commented 3 months ago

I've attached a sample project, as seen from the log files, compilation time for scss changes is approximately 1.5min

martinjagodic commented 3 months ago

Thanks for the repo. You use gatsby-starter-decap-cms template, so I'm moving the issue there. It's probably more related to Gatsby because that's the one reloading CSS.