question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

[v6] - Routing - webpack alias doesnt seem to work when building the HTML

See original GitHub issue

building the assets with webpack works fine, but when the build process tries to build the HTML pages i get the following error:

Error: Failed exporting HTML for URL 404 (src/pages/404.jsx): Could not load React-Static routes! Please double check your webpack configuration for consistency and restart/rebuil  d your app. If this error persists, it is likely a webpack resolve.alias problem and you should file an issue at "https://github.com/nozzle/react-static/issues" ASAP.

  - routes.js:2 module.exports
    [app]/[react-static]/routes.js:2:9

  - react-dom-server.node.production.min.js:28 d
    [app]/[react-dom]/cjs/react-dom-server.node.production.min.js:28:492

  - react-dom-server.node.production.min.js:30 ua
    [app]/[react-dom]/cjs/react-dom-server.node.production.min.js:30:494

  - react-dom-server.node.production.min.js:35 a.render
    [app]/[react-dom]/cjs/react-dom-server.node.production.min.js:35:48

  - react-dom-server.node.production.min.js:34 a.read
    [app]/[react-dom]/cjs/react-dom-server.node.production.min.js:34:288

  - react-dom-server.node.production.min.js:45 renderToString
    [app]/[react-dom]/cjs/react-dom-server.node.production.min.js:45:6

  - exportRoute.js:131 renderToStringAndExtract
    [app]/[react-static]/src/static/exportRoute.js:131:21

i was unable to find the correct spot of this bug, the development server works fine…

Issue Analytics

  • State:closed
  • Created 5 years ago
  • Reactions:3
  • Comments:19 (14 by maintainers)

github_iconTop GitHub Comments

2reactions
tannerlinsleycommented, Oct 6, 2018

Well shoot. I’ll double back and try with a clean install.

On Sat, Oct 6, 2018 at 2:29 AM Bartłomiej Maciejiczek < notifications@github.com> wrote:

Unfortunately, it doesn’t work.

I’ve changed the version to “react-static”: “6.0.0-beta.25”, updated node modules and it wasn’t working. 2.

I upgraded react-static (globally) and created a new project with basic template.

Still the same.

— You are receiving this because you were mentioned.

Reply to this email directly, view it on GitHub https://github.com/nozzle/react-static/issues/793#issuecomment-427556567, or mute the thread https://github.com/notifications/unsubscribe-auth/AFUmCebNPe8u8FXA4aP4di5gIiEQBAIjks5uiGnUgaJpZM4XJpO1 .

0reactions
digitalkaozcommented, Nov 16, 2018

works now

Read more comments on GitHub >

github_iconTop Results From Across the Web

Routing not working as expected in React app using react ...
It seems modifying my webpack config for dev worked. devServer: { port: 4000, hot: true, //enable webpack hot module replacement open: true, ...
Read more >
Resolve | webpack
you can use the alias: import Utility from 'Utilities/utility';. A trailing $ can also be added to the given object's keys to signify...
Read more >
[Solved]-Webpack Aliases in Node JS Server code-Reactjs
Try to use NODE_PATH . Node will always look for a module in this path during require calls. It allows to short cut...
Read more >
React dynamic imports and route-centric code splitting guide
Learn how to speed up your React apps using dynamic imports, React.lazy(), React.Suspense, React Router, and Loadable Components.
Read more >
Common Routing Tasks - Angular
To use the Angular router, an application needs to have at least two components so that it can navigate from one to the...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found