Briefly summarize the issues you have been experiencing.
I’m starting to have issues with deploying sites on Netlify. I’m not really sure how they broke but it should be noted that they are both Gatsby sites. For one of the sites, one of the build errors in local development points to an npm package that has something to do with a Gatsby plugin. Another website deploys fine locally but on Netlify I get the error:
6:40:18 PM: Installing NPM modules using Yarn version 1.13.0 6:40:18 PM: yarn install v1.13.0 6:40:18 PM: error package.json: Name contains illegal characters 6:40:18 PM: info Visit https://yarnpkg.com/en/docs/cli/install for documentation about this command. 6:40:18 PM: Error during Yarn install 6:40:18 PM: failed during stage 'building site': Build script returned non-zero exit code: 1
Interestingly, I get this error for both builds now so this leads me to believe that this is something to do with Netlify.
What have you tried as far as troubleshooting goes? Do you have an idea what is causing the problem?
I’m still getting comfortable with how Netlify builds and deploys sites so I’m not 100% on how it works but I went through the build settings docs and tried building the sites locally. This worked for the site without the conflicting gatsby package and failed for the site with the busted package. My hunch is that it has something to do with my local version (npm, yarn, etc) not lining up with Netlify’s settings. I did run a couple
npm updates to try to resolve the problem, so its possible that I’ve altered some version somewhere.
I’m not exactly sure how/where to verify the build settings though I understand this stuff is listed along with the build image. My initial theory was it had something to do with an outdated package or version of one of the package installers. Not sure why I have both a package.json and yarn.lock file in my src files. I don’t remember explicitly installing yarn.
Ideally I’d like to verify that the build settings and my local settings are the same but not sure where to get started with that.
Do you have any other information that is relevant, such as links to docs, libraries, or other resources?