Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Netlify won't use github workflows, build fails not seeing config for Gatsby v5 on Netlify #301

Open
gabros20 opened this issue Nov 27, 2023 · 0 comments

Comments

@gabros20
Copy link
Collaborator

gabros20 commented Nov 27, 2023

Currently seeing a build error in Netlify's preview build logs in the pull request checks.
From the log I assume the Github workflows config won't be picked up by Netlify and this can be expected.

That means the Netlify CI will run it's default npm install command. This won't work for us now as with the Gatsby v5 we need node modules to be installed with the npm install --legacy-peer-deps command to run the builds without peer dep errors.

As the first attempt to fix this:

  1. Please add the following CI flags to Environment Variables, which should resolve builds failing:
  • NPM_FLAGS with the value --legacy-peer-deps to resolve peer dep issues as described in the official debug doc:
    Build fails on peer dependency conflict
  • NODE_VERSION with the value 18 to set the latest Node v18 for build environment required by Gatsby v5 as described in the official debug doc: Node.js and JavaScript

Screenshot 2023-11-27 at 12 40 28

  1. After adding the flag redeploy with cache cleaning.`

Screenshot 2023-11-27 at 12 20 40

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant