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.

× TypeError: Cannot read property 'component---src-templates-home-js' of undefined createComponentUrls D:/projects/someProject/.cache/loader.js:348

See original GitHub issue

After add gatsby-plugin-offline plugin I have this issue when do gatsby develop I have got this error messages × TypeError: Cannot read property ‘component—src-templates-home-js’ of undefined createComponentUrls D:/projects/myproject/.cache/loader.js:348 345 | } 346 | } 347 |

348 | const createComponentUrls = componentChunkName => 349 | window.___chunkMapping[componentChunkName].map( 350 | chunk => PATH_PREFIX + chunk 351 | ) View compiled DevLoader.getResourceURLsForPathname D:/projects/p7s1p4-4gc-web/.cache/loader.js:303 300 | if (page) { 301 | const pageResources = toPageResources(page.payload) 302 | 303 | return [ 304 | …createComponentUrls(pageResources.page.componentChunkName), 305 | createPageDataUrl(pagePath), 306 | ] View compiled getResourceURLsForPathname D:/projects/p7s1p4-4gc-web/.cache/loader.js:411 408 | enqueue: rawPath => instance.prefetch(rawPath), 409 | 410 | // Real methods 411 | getResourceURLsForPathname: rawPath => 412 | instance.getResourceURLsForPathname(rawPath), 413 | loadPage: rawPath => instance.loadPage(rawPath), 414 | loadPageSync: rawPath => instance.loadPageSync(rawPath), View compiled ▶ 2 stack frames were collapsed. (anonymous function) D:/projects/p7s1p4-4gc-web/.cache/api-runner-browser.js:35 32 | args.loadPage = loadPage 33 | args.loadPageSync = loadPageSync 34 | 35 | const result = plugin.plugin[api](args, plugin.options) 36 | if (result && argTransform) { 37 | args = argTransform({ args, result, plugin }) 38 | } View compiled ./.cache/api-runner-browser.js.exports.apiRunner D:/projects/p7s1p4-4gc-web/.cache/api-runner-browser.js:22 19 | } 20 | } 21 | 22 | let results = plugins.map(plugin => { 23 | if (!plugin.plugin[api]) { 24 | return undefined 25 | } View compiled onRouteUpdate D:/projects/p7s1p4-4gc-web/.cache/navigation.js:45 42 | 43 | const onRouteUpdate = (location, prevLocation) => { 44 | if (!maybeRedirect(location.pathname)) { 45 | apiRunner(onRouteUpdate, { location, prevLocation }) 46 | // Temp hack while awaiting https://github.com/reach/router/issues/119 47 | window.__navigatingToLink = false 48 | } View compiled RouteUpdates.componentDidMount D:/projects/p7s1p4-4gc-web/.cache/navigation.js:218 215 | } 216 | 217 | componentDidMount() { 218 | onRouteUpdate(this.props.location, null) 219 | } 220 | 221 | componentDidUpdate(prevProps, prevState, shouldFireRouteUpdate) { View compiled ▶ 18 stack frames were collapsed. (anonymous function) D:/projects/p7s1p4-4gc-web/.cache/app.js:67 64 | const preferDefault = m => (m && m.default) || m 65 | let Root = preferDefault(require(./root)) 66 | domReady(() => { 67 | renderer(<Root />, rootElement, () => { 68 | apiRunner(onInitialClientRender) 69 | }) 70 | })

I have checked 'component—src-templates-home-js+somehash.js` is exist in pucblic directory. I am using windows 10

Issue Analytics

  • State:closed
  • Created 3 years ago
  • Comments:5 (1 by maintainers)

github_iconTop GitHub Comments

3reactions
ArmenMelkcommented, Apr 16, 2020

@madalynrose after clean site data from browser it’s start work properly

0reactions
github-actions[bot]commented, May 21, 2020

Hey again!

It’s been 30 days since anything happened on this issue, so our friendly neighborhood robot (that’s me!) is going to close it. Please keep in mind that I’m only a robot, so if I’ve closed this issue in error, I’m HUMAN_EMOTION_SORRY. Please feel free to reopen this issue or create a new one if you need anything else. As a friendly reminder: the best way to see this issue, or any other, fixed is to open a Pull Request. Check out gatsby.dev/contribute for more information about opening PRs, triaging issues, and contributing!

Thanks again for being part of the Gatsby community! 💪💜

Read more comments on GitHub >

github_iconTop Results From Across the Web

Cannot read property 'component---src-pages-index-jsx' of ...
I tried removing any of my custom written components until I ended up with the normal starting boilerplate. But it still wouldn't work....
Read more >
Gatsby - Cannot read property 'component---src-...anycodings
Answers 1 : of Gatsby - Cannot read property component---src-pages-index-jsx of undefined. I had the same problem.
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