Gatsby Build fail

When try to deploy my gatsby project I got this error, while it builds successfully in local!

11:00:53 AM: Finished restoring cached node modules

11:00:53 AM: Installing npm packages using npm version 10.7.0

11:00:56 AM: Failed during stage ‘Install dependencies’: dependency_installation script returned
11:00:56 AM: npm error code ERESOLVE

11:00:56 AM: npm error ERESOLVE unable to resolve dependency tree
11:00:56 AM: npm error

11:00:56 AM: npm error While resolving: gatsby-starter-default@0.1.0

11:00:56 AM: npm error Found: i18next@23.11.5
11:00:56 AM: npm error node_modules/i18next

11:00:56 AM: npm error
i18next@“^23.11.3” from the root project
11:00:56 AM: npm error

11:00:56 AM: npm error Could not resolve dependency:

11:00:56 AM: npm error peer i18next@“^22.0.6” from gatsby-plugin-react-i18next@3.0.1

11:00:56 AM: npm error node_modules/gatsby-plugin-react-i18next

11:00:56 AM: npm error gatsby-plugin-react-i18next@“^3.0.1” from the root project
11:00:56 AM: npm error

11:00:56 AM: npm error Fix the upstream dependency conflict, or retry

11:00:56 AM: npm error this command with --force or --legacy-peer-deps

11:00:56 AM: npm error to accept an incorrect (and potentially broken) dependency resolution.
11:00:56 AM: nom error

11:00:56 AM: nom error

11:00:56 AM: npm error For a full report see:

11:00:56 AM: npm error /opt/buildhome/.npm/_logs/2024-06-06T07_00_53_570Z-eresolve-report.txt

11:00:56 AM: npm error A complete log of this run can be found
in: /opt/buildhome/.npm/_logs/2024-06-06707
11:00:56 AM: Error during npm install

11:00:56 AM: Failing build: Failed to install dependencies
non-zero
exit code: 1
_00_53_5707-debug-0.10g

Read this

1 Like