Closed vasfvitor closed 2 years ago
Can you paste a more detailed log? Like which dependencies fail to install.
Currently the starter is deployed on Netlify from the master
branch and I haven't noticed any issues so far.
These are the settings it uses for the deploy: https://github.com/Vagr9K/gatsby-advanced-starter/blob/master/netlify.toml
Sure. These are the exact settings that Netlify used (I highlighted in log), but in Gatsby Cloud I didn't configure nothing.
Gatsby Cloud fails due to it passing unsupported parameters to Yarn 3. It looks like they only support Yarn Classic. You can try npm for Gatsby Cloud since it's also supported by the starter. Just make sure to update your package-lock.json
with an npm i
before deploying.
As for Netlify, it fails due to build issue.
In particular some plugin/code calls window
which causes the Gatsby build to fail. It seems to be connected to NetlifyCMS but I'm not sure.
It's possible that netlifycms
introduced some sort of a regression.
Do local builds work?
Just tested building locally and it worked. Not sure it's relevant but I have Yarn 3.0.0 and Node v16.9.1.
I didn't tried again in Gatsby Cloud.
Ok, I tried again (the same fork) in Netlify and it worked. I don't understand what happened in Netlify (I'm thinking it's probably my fault, it always is the operator fault).
Thank you for your help.
For future reference:
I didn't find exactly what the problem was in Netlify. I believe it's related to cache, it worked after I deleted the site (inside Netlify) and reconnected the forked repo again.
And in Gatsby Cloud it worked after I set the yarn version to classic yarn set version classic
You were right, they don't support Yarn 3 yet. But I'm not sure about the consequences or if anything is broken.
Just make sure to update your package-lock.json with an npm i before deploying.
As about this, I don't know how to implement it, after some research I found how to set the yarn version so I did it. But I'd prefer to not use yarn classic because I don't know if it can cause problem. Can you please comment how to do it (the npm i
in package-lock)?
But I'm not sure about the consequences or if anything is broken. It shouldn't be.
All 3 package managers can be used (npm, Yarn classic, Yarn v3). Just make sure to stick with one so you don't end up with multiple lockfiles.
Just make sure to update your package-lock.json with an npm i before deploying. This is only if you've used yarn for adding/removing/updating packages and are instead using npm now.
Just run npm i
so it will update the npm lockfile in accordance with package.json
.
Basically just stick with one package manager and you will be fine.
Hi, I'm trying do deploy but I'm having a hard time, I've tried both Gatsby Cloud, CloudFlare Pages and Netlify.
In netlify I got this:
And in Gatsby Cloud:
The steps:
1.Fork this repo https://github.com/Vagr9K/gatsby-advanced-starter 2.Deploy in Netlify or Gatsby Cloud
I can develop normally in localhost, although I get a lot of YN0002 errors, but when I try to build it fails. The only that I get to work out of the box was the https://github.com/Vagr9K/gatsby-material-starter
Thanks.