gatsby build fails as gatsby command not installed

I'm trying to deploy a new gatsby project and the build are failing as the gatsby command is not found. I have the project settings set to a gatsby project as the docs mentions.
09:21:05.344 Cloning repository...
09:21:06.234 From https://github.com/anuaimi/travelplans
09:21:06.235 * branch b241af46aef5e4bccb182515d4b380355c1cfcb6 -> FETCH_HEAD
09:21:06.235
09:21:06.281 HEAD is now at b241af4 update modules for security fixes
09:21:06.281
09:21:06.398
09:21:06.428 Success: Finished cloning repository files
09:21:07.195 Detected the following tools from environment: [email protected], [email protected]
09:21:07.196 Installing project dependencies: npm clean-install --progress=false
09:21:14.382 npm WARN deprecated [email protected]: Modern JS already guarantees Array#sort() is a stable sort, so this library is deprecated. See the compatibility table on MDN: https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Array/sort#browser_compatibility
09:21:18.783 npm WARN deprecated [email protected]: babel-eslint is now @babel/eslint-parser. This package will no longer receive updates.
09:21:18.922 npm WARN deprecated @types/[email protected]: This is a stub types definition. keyv provides its own type definitions, so you do not need this installed.
09:21:41.420
09:21:41.421 added 1499 packages, and audited 1500 packages in 33s
09:21:41.421
09:21:41.421 344 packages are looking for funding
09:21:41.422 run `npm fund` for details
09:21:41.423
09:21:41.423 found 0 vulnerabilities
09:21:41.451 Executing user command: gatsby build
09:21:41.458 /bin/sh: 1: gatsby: not found
09:21:41.459 Failed: Error while executing user command. Exited with error code: 127
09:21:41.467 Failed: build command exited with code: 1
09:21:42.429 Failed: error occurred while running build command
09:21:05.344 Cloning repository...
09:21:06.234 From https://github.com/anuaimi/travelplans
09:21:06.235 * branch b241af46aef5e4bccb182515d4b380355c1cfcb6 -> FETCH_HEAD
09:21:06.235
09:21:06.281 HEAD is now at b241af4 update modules for security fixes
09:21:06.281
09:21:06.398
09:21:06.428 Success: Finished cloning repository files
09:21:07.195 Detected the following tools from environment: [email protected], [email protected]
09:21:07.196 Installing project dependencies: npm clean-install --progress=false
09:21:14.382 npm WARN deprecated [email protected]: Modern JS already guarantees Array#sort() is a stable sort, so this library is deprecated. See the compatibility table on MDN: https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Array/sort#browser_compatibility
09:21:18.783 npm WARN deprecated [email protected]: babel-eslint is now @babel/eslint-parser. This package will no longer receive updates.
09:21:18.922 npm WARN deprecated @types/[email protected]: This is a stub types definition. keyv provides its own type definitions, so you do not need this installed.
09:21:41.420
09:21:41.421 added 1499 packages, and audited 1500 packages in 33s
09:21:41.421
09:21:41.421 344 packages are looking for funding
09:21:41.422 run `npm fund` for details
09:21:41.423
09:21:41.423 found 0 vulnerabilities
09:21:41.451 Executing user command: gatsby build
09:21:41.458 /bin/sh: 1: gatsby: not found
09:21:41.459 Failed: Error while executing user command. Exited with error code: 127
09:21:41.467 Failed: build command exited with code: 1
09:21:42.429 Failed: error occurred while running build command
2 Replies
anuaimi
anuaimiOP2y ago
the docs mention: you should see cloudflare pages installing gatsby, your project dependencies, and building your site yet the build log doesn't seem to install gatsby. ok, I got a solution from the community website. Looks like the Cloudlfare docs and default build settings for Gatsby are out of date. gatsby build does not work with the v2 build system. You need to use npm run build. Hopefully someone from Cloudflare will see this and update the docs/system accordingly also, does anyone know how to get support from Cloudflare for Pages. I'm on the paid plan ($5+usage) but the site still says I need a 'paid plan'. Is there another plan that allows contacting customer support. thanks
Vero
Vero2y ago
Hey, thanks for raising this, I’ve passed this internally to the team
Want results from more Discord servers?
Add your server