GithubHelp home page GithubHelp logo

Comments (3)

iamsolankiamit avatar iamsolankiamit commented on May 25, 2024 1

@kreker92 react-static needs react-hot-loader as a peer-dependency, which means you have to install it in your project

from react-static.

kreker92 avatar kreker92 commented on May 25, 2024

Try to FIX

I've tried to update react-static version
In package.json I've changed

    "react-static": "^^7.5.1",
    "react-static-plugin-reach-router": "^^7.5.1",
    "react-static-plugin-sitemap": "^^7.5.1",
    "react-static-plugin-source-filesystem": "^^7.5.1",
    "react-static-plugin-typescript": "^^7.5.1"

To

    "react-static": "^7.6.2",
    "react-static-plugin-reach-router": "^7.6.2",
    "react-static-plugin-sitemap": "^7.6.2",
    "react-static-plugin-source-filesystem": "^7.6.2",
    "react-static-plugin-typescript": "^7.6.2"

Environment

  System:
    OS: macOS 11.6
    CPU: (4) x64 Intel(R) Core(TM) i5-5350U CPU @ 1.80GHz
    Memory: 879.74 MB / 8.00 GB
    Shell: 3.2.57 - /bin/bash
  Binaries:
    Node: 14.17.6 - /usr/local/bin/node
    Yarn: 1.22.17 - /usr/local/bin/yarn
    npm: 7.24.1 - /usr/local/bin/npm
    Watchman: 4.9.0 - /usr/local/bin/watchman
  Browsers:
    Chrome: 92.0.4515.131
    Firefox: 94.0.1
    Safari: 15.0
  npmPackages:
    react: ^16.14.0 => 16.14.0 
    react-dom: ^16.14.0 => 16.14.0 
    react-hot-loader: ^4.13.0 => 4.13.0 
    react-static: ^7.6.2 => 7.6.2 
    react-static-plugin-reach-router: ^7.6.2 => 7.6.2 
    react-static-plugin-sitemap: ^7.6.2 => 7.6.2 
    react-static-plugin-source-filesystem: ^7.6.2 => 7.6.2 
    react-static-plugin-typescript: ^7.6.2 => 7.6.2 
  npmGlobalPackages:
    react-static: 7.6.2

Bug

But still have the same error

$ react-static bundle --analyze
Bundling application for Production...

Cleaning dist...
[✓] Dist cleaned (0.8s)
Cleaning artifacts...
[✓] Artifacts cleaned
Building Routes...
Importing routes from directory...
{ has404: true }
[✓] Routes Built (0.3s)
Building Templates...
[✓] Templates Built (0.1s)
Copying public directory...
[✓] Public directory copied (1s)
Bundling App...
Error parsing bundle asset "/Users/viktorzaytsev/work/web_test/dist/main.fef6307a.js": no such file

No bundles were parsed. Analyzer will show only original module sizes from stats file.

Webpack Bundle Analyzer is started at http://127.0.0.1:8888
Use Ctrl+C to close it
Version: webpack 4.46.0
Time: 18775ms
Built at: 24.11.2021 16:49:46
           Asset      Size  Chunks               Chunk Names
main.fef6307a.js  1.43 KiB       0  [immutable]  main
[0] multi ../lib/bootstrapPlugins.js ../lib/bootstrapTemplates.js ../lib/bootstrapApp.js 52 bytes {0} [built]

ERROR in multi ../lib/bootstrapPlugins.js ../lib/bootstrapTemplates.js ../lib/bootstrapApp.js
Module not found: Error: Can't resolve 'react-hot-loader/webpack' in '/Users/viktorzaytsev/.config/yarn/global/node_modules/react-static/node_modules'
 @ multi ../lib/bootstrapPlugins.js ../lib/bootstrapTemplates.js ../lib/bootstrapApp.js main[0]

ERROR in multi ../lib/bootstrapPlugins.js ../lib/bootstrapTemplates.js ../lib/bootstrapApp.js
Module not found: Error: Can't resolve 'react-hot-loader/webpack' in '/Users/viktorzaytsev/.config/yarn/global/node_modules/react-static/node_modules'
 @ multi ../lib/bootstrapPlugins.js ../lib/bootstrapTemplates.js ../lib/bootstrapApp.js main[1]

ERROR in multi ../lib/bootstrapPlugins.js ../lib/bootstrapTemplates.js ../lib/bootstrapApp.js
Module not found: Error: Can't resolve 'react-hot-loader/webpack' in '/Users/viktorzaytsev/.config/yarn/global/node_modules/react-static/node_modules'
 @ multi ../lib/bootstrapPlugins.js ../lib/bootstrapTemplates.js ../lib/bootstrapApp.js main[2]

                => There were ERRORS during the prod build stage! :(
                => Fix them and try again!
              
Version: webpack 4.46.0
Time: 19229ms
Built at: 24.11.2021 16:49:46
        Asset      Size  Chunks  Chunk Names
static-app.js  4.58 KiB       0  main
[0] multi ../lib/bootstrapPlugins.js ../lib/bootstrapTemplates.js ../lib/bootstrapApp.js 52 bytes {0} [built]

ERROR in multi ../lib/bootstrapPlugins.js ../lib/bootstrapTemplates.js ../lib/bootstrapApp.js
Module not found: Error: Can't resolve 'react-hot-loader/webpack' in '/Users/viktorzaytsev/.config/yarn/global/node_modules/react-static/node_modules'
 @ multi ../lib/bootstrapPlugins.js ../lib/bootstrapTemplates.js ../lib/bootstrapApp.js main[0]

ERROR in multi ../lib/bootstrapPlugins.js ../lib/bootstrapTemplates.js ../lib/bootstrapApp.js
Module not found: Error: Can't resolve 'react-hot-loader/webpack' in '/Users/viktorzaytsev/.config/yarn/global/node_modules/react-static/node_modules'
 @ multi ../lib/bootstrapPlugins.js ../lib/bootstrapTemplates.js ../lib/bootstrapApp.js main[1]

ERROR in multi ../lib/bootstrapPlugins.js ../lib/bootstrapTemplates.js ../lib/bootstrapApp.js
Module not found: Error: Can't resolve 'react-hot-loader/webpack' in '/Users/viktorzaytsev/.config/yarn/global/node_modules/react-static/node_modules'
 @ multi ../lib/bootstrapPlugins.js ../lib/bootstrapTemplates.js ../lib/bootstrapApp.js main[2]

                => There were ERRORS during the node build stage! :(
                => Fix them and try again!
              
[✓] App Bundled (24.3s)

from react-static.

kreker92 avatar kreker92 commented on May 25, 2024

FIX

$ yarn global add react-hot-loader

from react-static.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.