TypeError: Failed exporting HTML for URL About (src/pages/About.js): Cannot read property 'href' of undefined
See original GitHub issueI just updated to react-static@v6.0.0-beta.16
, and now yarn build
will throw the following error for any file that my pages
folder will contain:
TypeError: Failed exporting HTML for URL About (src/pages/About.js): Cannot read property 'href' of undefined
Environment
react-static -v
: 6.0.0-beta.16node -v
: 8.10.0yarn --version
: 1.6.0- Operating system: macOS High Sierra
Steps to Reproduce the problem
Base your steps off of any freshly installed react-static template!
yarn add react-static@v6.0.0-beta.16
yarn build
Issue Analytics
- State:
- Created 5 years ago
- Reactions:4
- Comments:14 (4 by maintainers)
Top Results From Across the Web
Failed exporting HTML for URL About (src\pages\About.js ...
This doesn't happen when running the site (npm run start). More odd, happens only when build the site, for some pages. The pages...
Read more >Cannot read property 'href' of undefined? - Squarespace Forum
Site URL: https://www.uartsunion.org/ I am getting the "Cannot read property 'href' of undefined" error: Tech support says they can't help ...
Read more >Gatsby 101 | Note of Thi - dinhanhthi.com
When React sees an element representing a user-defined component, it passes JSX attributes to this component as a single object. We call this...
Read more >cannot read properties of undefined (reading 'href') - You.com
The "Cannot read properties of undefined" error occurs for multiple reasons: Accessing a property on a variable that stores an undefined value. Accessing...
Read more >@netlify/esbuild-darwin-arm64 | Yarn - Package Manager
The macOS ARM 64-bit binary for esbuild, a JavaScript bundler. ... Fix code generation for export default and /* @__PURE__ */ call (#2203)....
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 Free
Top 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
@tannerlinsley I’m having the same issue, would you mind looking at my project: https://github.com/E-Wagner/fellow I’ve been working many hours on this but it broke unexpectedly…
It might also be a
<Router>
wrapper component (if you migrated from an older version of react-static) like here.Or if you have
React.Suspense
&React.lazy()
inside of any page, it will also cause the same error (v.7.6.2).It seems that this error can mean many different things. Is there any way that error messages could be more specific?