Netlify not recognizing Gatsby framework for build

Hi all! I’ve used Netlify for years and have previous made a Gatsby site on it. That site uses the Netlify/Gatsby plugins, default build options (yarn build, serving public/), and says “Deploys from GitHub with Gatsby” on the site’s card on my Netlify dashboard. In the console log, it recognizes the framework as Gatsby.

But on my latest project, which is also Gatsby, I have set it up the same way (same packages, same commands, plugins are installed) but in the console log it is not recognizing the framework. It says 0 frameworks detected.

Both sites have the same nelitfy.toml:

[[plugins]]
  package = "@netlify/plugin-gatsby"

Is there something I’m missing in order to get it to work? One difference is the second site’s DNS is not fully managed by Netlify. Is that affecting its ability to serve it with the Gatsby plugin? Another theory is that the first site does use a CMS to pull down data then build dynamic pages, but the second page is just serving pages from the /pages directory that aren’t dynamic. Finally, the newest project is TypeScript but the old one is JavaScript. Is that affecting the recognition?

Is there a way I can manually flag it as a Gatsby build?

1 Like

Could you share your site name @zigler?

Thanks for your response @hrishikesh. My site name is flourishing-faloodeh-95234e.

Hi @zigler,

While the framework not being detected is an issue in itself, I’m not sure why your deploy says this:

❯ Config file
No config file was defined: using default values.

what that means is, we did not detect a netlify.toml, and thus the plugin setting you’ve made is being ignored.

Do you think you can share your repo?

@hrishikesh Interesting. So I checked my other Gatsby repo (andrewzigler2) that is set up the same way but says “with Gatsby” and recognizes the framework, and that message is also in the log there. They both have the same setup, a /static folder with a netlify.toml file inside. The file for both contains what’s quoted above. I can see that the file ends up inside my /public directory, which is how that directory works: Using the Static Folder | Gatsby

I can’t share the repo because it’s private, but the netlify.toml is ending up in the /public directory. Perhaps the issue is that the netlify.toml file needs to be in the / folder, not /static? Very odd that the configuration is broken for both but one manages to say “with Gatsby”. I can try moving the file and report back next build.

netlify.toml should be in the root of the repo, not inside static.

@hrishikesh Awesome. I moved it and rebuilt and now it recognizes the plugin and uses it. However, it still manages to not detect the framework, even though it uses the Gatsby plugin successfully.