Error in Build regarding router-loader
See original GitHub issueAfter following the instructions for routing from the documentation, and running the build script it errors out with the below:
ERROR in ./pages/container.js
Module build failed: TypeError: Cannot read property 'length' of null
at Object.module.exports (.../loaders/route-loader.js:8:7)
Note:
For the route itself I am wrapping the component in a container using connect()
from react-redux
but shouldn’t kill the routing?
./src/routes.js
./src/pages/index.js
And here Component
is simply pointing to a container component like:
import Component from './component'
function mapStateToProps() {
// some mapping here..
}
export default connect(mapStateToProps)(Component)
Let me know if additional info is required ✌️
Issue Analytics
- State:
- Created 6 years ago
- Comments:10 (5 by maintainers)
Top Results From Across the Web
React Router 6 show error in element when using loader
I'm trying to show an error message on the same page if there's an error when loading a resource. However, when using loader...
Read more >Angular production build error in nx version 13.7.1 · Issue #8768
I am experiencing this same error on nx 13.6.1 after updating (via nx migrate) @angular-devkit/build-angular from 13.1.2 to 13.2.0. This is ...
Read more >Remixing React Router
Remix is able to co-locate loaders and actions with the route modules and builds the route config itself from a file system. We...
Read more >Page Not Found Error on Netlify Reactjs React Router solved
React Router handles routing on the client-side (browser) so when you visit the non-root page (e.g. https://yoursite.netlify.com/login ), ...
Read more >Routing: Fundamentals - Next.js beta docs
Next.js 13 introduced a new file-system based router built on top of React Server Components with support for layouts, nested routing, loading states,...
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
Please move the
require("../styles/fonts.css")
from routes tosrc/client.js
As styles need to be managed via client it would make more sense and won’t hinder compilation of server.js@bytewiz I just create a gitter channel for react-pwa if you wish to join: https://gitter.im/react-pwa/Lobby?utm_source=share-link&utm_medium=link&utm_campaign=share-link