react-static / react-static

⚛️ 🚀 A progressive static site generator for React.

Home Page:https://github.com/react-static/react-static/discussions

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

[Bug] react-static 7.5.0 breaks build

reediculous456 opened this issue · comments

Reporting a bug?

Provide as much information as you can to reproduce the issue.
If the issue is not reproducible, it can't be fixed!
After updating from react-static v7.4.2 to v7.5.0, If I try to run react-static start or react-static build. I get anthe following error:

ERROR in multi (webpack)-dev-server/client?http://localhost:3001 (webpack)/hot/only-dev-server.js react-hot-loader/patch ../lib/bootstrapPlugins.js ../lib/bootstrapTemplates.js index.js
Module not found: Error: Can't resolve 'react-hot-loader/webpack' in '/Users/wesreed/git/Virtual-Events/UC-International-Conference/node_modules/react-static/node_modules'
 @ multi (webpack)-dev-server/client?http://localhost:3001 (webpack)/hot/only-dev-server.js react-hot-loader/patch ../lib/bootstrapPlugins.js ../lib/bootstrapTemplates.js index.js main[4]

I tried to manually install react-hot-loader which fixed the error message, but now when I run react-static build and try to server the dist folder the site hangs on load and eventually crashes with no error message

Environment

Run and copy the result of:

npx envinfo --system --npmPackages react* --binaries --npmGlobalPackages react* --browsers

here:

  System:
    OS: macOS 10.15.7
    CPU: (12) x64 Intel(R) Core(TM) i7-8700B CPU @ 3.20GHz
    Memory: 952.92 MB / 16.00 GB
    Shell: 5.7.1 - /bin/zsh
  Binaries:
    Node: 12.19.1 - /usr/local/bin/node
    Yarn: 1.22.10 - ~/git/Virtual-Events/UC-International-Conference/node_modules/.bin/yarn
    npm: 6.14.10 - /usr/local/bin/npm
  Browsers:
    Chrome: 88.0.4324.150
    Firefox: 85.0
    Safari: 14.0.2
  npmPackages:
    react: ^16.14.0 => 16.14.0 
    react-bootstrap: ^1.4.3 => 1.4.3 
    react-countdown: ^2.3.1 => 2.3.1 
    react-dom: ^16.14.0 => 16.14.0 
    react-ga: ^2.7.0 => 2.7.0 
    react-image-lightbox: ^5.1.1 => 5.1.1 
    react-select: ^3.2.0 => 3.2.0 
    react-slick: ^0.25.2 => 0.25.2 
    react-static: ^7.5.0 => 7.5.0 
    react-static-plugin-favicons: ^2.0.0 => 2.0.0 
    react-static-plugin-reach-router: ^7.5.0 => 7.5.0 
    react-static-plugin-sass: ^7.3.0 => 7.3.0 
    react-static-plugin-sitemap: ^7.5.0 => 7.5.0 
    react-static-plugin-source-filesystem: ^7.5.0 => 7.5.0 
  npmGlobalPackages:
    react-static: 7.4.2

of course include any other package versions here if relevant.

Steps to Reproduce the problem

Base your steps off of any freshly installed react-static template!

  1. Start from basic template
  2. update react-static (because the template doesn't install the same version at the react-static that created it)
  3. see the error mentioned above

react-hot-loader is a peer dependency, so the manual install step is correct. I think the other issue you encountered is #1564. I'm closing this in favour of that.