Cannot read property 'page' of undefined when renaming a page in develop
See original GitHub issueDescription
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:
- Created 4 years ago
- Comments:9 (1 by maintainers)
Top GitHub Comments
To clarify your issue: One doesn’t see the 404 page from Gatsby but an unrelated error as it’s still in
.cache
. Agatsby clean
resolves the issue.gatsby clean
removespublic
folder, either useclean
or remove manually.cache
andpublic
folders.