Closed Baivaras closed 3 years ago
Hi @Baivaras !
Sorry to hear you're running into an issue. To help us best begin debugging the underlying cause, it is incredibly helpful if you're able to create a minimal reproduction. This is a simplified example of the issue that makes it clear and obvious what the issue is and how we can begin to debug it.
If you're up for it, we'd very much appreciate if you could provide a minimal reproduction and we'll be able to take another look.
Thanks for using Gatsby! 💜
Miminal repro https://github.com/pieh/i31055
Current working theory: https://github.com/gatsbyjs/gatsby/blob/a35d615f9c8d596230ecd1f121f214b9879eb7d3/packages/gatsby/src/commands/build-utils.ts#L84-L167
Doesn't take into account that /TEST/
and /test/
would produce same (in terms of case insensitive filesystems) files and first create one vartiant and then deletes it.
Description
Recently I migrated my project from gatsby V2 to V3 and after migration, some of the code does not work as it supposed to.
A scenario which I was using and which I need to achieve right now:
/pages
folder, every subfolder hasindex.js
files and is named uppercasegatsby-node.js
file inonCreatePage
function I delete page withdeletePage
function and create a new one with a different slug withcreatePage
function.my
gatsby-node.js
code:After migration, this method deletes the page but does not create a new one, seems that
createPage
function does not work anymore or it has some issues. As a result, I do not get any pages as it was deleted, it does not appear in thepublic
folder structure either.Maybe I do not spot my mistake, tried many different things to solve the issue but did not work.
Is there any way to force gatsby URLs to be JUST lowercase?
Thanks for any help
Steps to reproduce
-
Expected result
The expected result is to have each page created with a lower case slug when pages folder sub-directories are named uppercase
Actual result
Pages are getting deleted with
deletePage
but not created withcreatePage
function as it used to be in gatsby V2Environment
System: OS: macOS 11.2.3 CPU: (12) x64 Intel(R) Core(TM) i7-9750H CPU @ 2.60GHz Shell: 5.8 - /bin/zsh Binaries: Node: 14.15.1 - ~/.nvm/versions/node/v14.15.1/bin/node npm: 7.9.0 - ~/.nvm/versions/node/v14.15.1/bin/npm Languages: Python: 2.7.16 - /Users/baivaras/.pyenv/shims/python Browsers: Chrome: 90.0.4430.85 Firefox: 86.0 Safari: 14.0.3 npmPackages: gatsby: ^3.3.1 => 3.3.1 gatsby-codemods: ^2.3.0 => 2.3.0 gatsby-image: ^3.3.0 => 3.3.0 gatsby-plugin-anchor-links: ^1.2.1 => 1.2.1 gatsby-plugin-eslint: ^3.0.0 => 3.0.0 gatsby-plugin-facebook-pixel: ^1.0.5 => 1.0.5 gatsby-plugin-force-trailing-slashes: ^1.0.5 => 1.0.5 gatsby-plugin-google-analytics: ^3.3.0 => 3.3.0 gatsby-plugin-google-tagmanager: ^3.3.0 => 3.3.0 gatsby-plugin-hotjar: ^1.1.1 => 1.1.1 gatsby-plugin-image: ^1.3.1 => 1.3.1 gatsby-plugin-mailchimp: ^5.2.2 => 5.2.2 gatsby-plugin-manifest: ^3.3.0 => 3.3.0 gatsby-plugin-offline: ^4.3.0 => 4.3.0 gatsby-plugin-page-creator: ^3.3.0 => 3.3.0 gatsby-plugin-react-helmet: ^4.3.0 => 4.3.0 gatsby-plugin-react-svg: ^3.0.1 => 3.0.1 gatsby-plugin-remove-console: 0.0.2 => 0.0.2 gatsby-plugin-remove-trailing-slashes: ^3.3.0 => 3.3.0 gatsby-plugin-robots-txt: ^1.5.6 => 1.5.6 gatsby-plugin-s3: ^0.3.8 => 0.3.8 gatsby-plugin-sass: ^4.3.0 => 4.3.0 gatsby-plugin-sharp: ^3.3.1 => 3.3.1 gatsby-plugin-sitemap: ^3.3.0 => 3.3.0 gatsby-plugin-styled-components: ^4.3.0 => 4.3.0 gatsby-plugin-webpack-bundle-analyser-v2: ^1.1.22 => 1.1.22 gatsby-plugin-zopfli: ^2.0.0 => 2.0.0 gatsby-source-airtable: ^2.1.1 => 2.1.1 gatsby-source-filesystem: ^3.3.0 => 3.3.0 gatsby-source-wordpress: ^5.3.1 => 5.3.1 gatsby-transformer-remark: ^4.0.0 => 4.0.0 gatsby-transformer-sharp: ^3.3.0 => 3.3.0 npmGlobalPackages: gatsby-cli: 3.3.0