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.

Cannot read property 'page' of undefined when renaming a page in develop

See original GitHub issue

Description

Gatsby throws an error when going to page-2 after renaming from default template.

Steps to reproduce

ran “gatsby new mysite” -> gatsby develop -> renamepage-2.js to page-3.js and the link in index.js from /page-2/ to /page-3/ -> stop gatsby with ctrl+c -> start gatsby with gatsby develop -> go to http://localhost:8000/page-2/ and see error

Expected result

It shouldn’t error

Actual result

it errored

Environment

System: OS: Linux 4.4 Ubuntu 18.04.3 LTS (Bionic Beaver) CPU: (6) x64 Intel® Core™ i5-9600K CPU @ 3.70GHz Shell: 4.4.20 - /bin/bash Binaries: Node: 12.2.0 - ~/.nvm/versions/node/v12.2.0/bin/node npm: 6.13.0 - ~/.nvm/versions/node/v12.2.0/bin/npm Languages: Python: 2.7.15+ - /usr/bin/python npmPackages: gatsby: ^2.18.12 => 2.18.12 gatsby-image: ^2.2.34 => 2.2.34 gatsby-plugin-manifest: ^2.2.31 => 2.2.31 gatsby-plugin-offline: ^3.0.27 => 3.0.27 gatsby-plugin-react-helmet: ^3.1.16 => 3.1.16 gatsby-plugin-sharp: ^2.3.5 => 2.3.5 gatsby-source-filesystem: ^2.1.40 => 2.1.40 gatsby-transformer-sharp: ^2.3.7 => 2.3.7 npmGlobalPackages: gatsby-cli: 2.8.27

Issue Analytics

  • State:closed
  • Created 4 years ago
  • Comments:9 (1 by maintainers)

github_iconTop GitHub Comments

4reactions
LekoArtscommented, Jan 20, 2020

To clarify your issue: One doesn’t see the 404 page from Gatsby but an unrelated error as it’s still in .cache. A gatsby clean resolves the issue.

2reactions
tarasmatsykcommented, Mar 17, 2020

gatsby clean removes public folder, either use clean or remove manually .cache and public folders.

Read more comments on GitHub >

github_iconTop Results From Across the Web

TypeError: Cannot read properties of "undefined"
let newItemName = prompt("What would you like to rename it as? ... so it cannot read property name of the non existent options[6]...
Read more >
Next 10.0.6 with webpack 5 & custom server throws `Cannot ...
Next 10.0.6 with webpack 5 & custom server throws Cannot read property 'replace' of undefined #21703.
Read more >
Solved: Renaming Widget Error: Cannot read property 'widge...
My project has 2 custom widgets that I developed, but only one of them fails. A third widget that also fails is simply...
Read more >
Cannot read properties of undefined (reading '0')
Specifically, this error occurs more often on our Data Deployer Application pages. Cause. You see this error because new orgs in Salesforce ...
Read more >
Cannot read properties of undefined (reading 'id') - TrackJS
This error can be thrown for a lot of reasons, as it is not uncommon to look for the id property of an...
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