# Conflicting peer dependency it builds fine locally but i don't know what to do now ? especially that i'm trying to deploy a three js web app which works fine on desktop but the images doesn't render and crash on mobile for some reason

**URL:** <https://answers.netlify.com/t/conflicting-peer-dependency-it-builds-fine-locally-but-i-dont-know-what-to-do-now-especially-that-im-trying-to-deploy-a-three-js-web-app-which-works-fine-on-desktop-but-the-images-doesnt-render-and-crash-on-mobile-for-some-reason/87136>\
**Category:** Support\
**Tags:** deployment, building, netlify-newbie\
**Created:** [March 6, 2023, 3:44pm UTC](https://answers.netlify.com/t/conflicting-peer-dependency-it-builds-fine-locally-but-i-dont-know-what-to-do-now-especially-that-im-trying-to-deploy-a-three-js-web-app-which-works-fine-on-desktop-but-the-images-doesnt-render-and-crash-on-mobile-for-some-reason/87136 "2023-03-06T15:44:47Z")\
**Posts on this page:** 15\
**Page:** 1

<div class="post-metadata">

**Author:** ![mahmoudhosnyomran97](https://sea1.discourse-cdn.com/netlify/user_avatar/answers.netlify.com/mahmoudhosnyomran97/32/48566_2.png) [@mahmoudhosnyomran97](https://answers.netlify.com/u/mahmoudhosnyomran97)\
**Post date:** [March 6, 2023, 3:44pm UTC](https://answers.netlify.com/t/conflicting-peer-dependency-it-builds-fine-locally-but-i-dont-know-what-to-do-now-especially-that-im-trying-to-deploy-a-three-js-web-app-which-works-fine-on-desktop-but-the-images-doesnt-render-and-crash-on-mobile-for-some-reason/87136/1 "2023-03-06T15:44:47Z")

</div>

5:29:15 PM: build-image version: 35ea3a28b0f0d0edb232d068bae8e965fce407e9 (focal)  
5:29:15 PM: buildbot version: 35ea3a28b0f0d0edb232d068bae8e965fce407e9  
5:29:15 PM: Fetching cached dependencies  
5:29:15 PM: Failed to fetch cache, continuing with build  
5:29:15 PM: Starting to prepare the repo for build  
5:29:15 PM: No cached dependencies found. Cloning fresh repo  
5:29:15 PM: git clone --filter=blob:none [GitHub - mahmoudhosnyomran97/my-3D-portfolio](https://github.com/mahmoudhosnyomran97/my-portfolio)  
5:29:16 PM: Preparing Git Reference refs/heads/master  
5:29:16 PM: Parsing package.json dependencies  
5:29:18 PM: Starting build script  
5:29:18 PM: Installing dependencies  
5:29:18 PM: Python version set to 2.7  
5:29:18 PM: v16.19.1 is already installed.  
5:29:19 PM: Now using node v16.19.1 (npm v8.19.3)  
5:29:19 PM: Enabling Node.js Corepack  
5:29:19 PM: Started restoring cached build plugins  
5:29:19 PM: Finished restoring cached build plugins  
5:29:19 PM: Attempting Ruby version 2.7.2, read from environment  
5:29:19 PM: Using Ruby version 2.7.2  
5:29:20 PM: Using PHP version 8.0  
5:29:20 PM: Started restoring cached corepack dependencies  
5:29:20 PM: Finished restoring cached corepack dependencies  
5:29:20 PM: No npm workspaces detected  
5:29:20 PM: Started restoring cached node modules  
5:29:20 PM: Finished restoring cached node modules  
5:29:20 PM: Installing npm packages using npm version 8.19.3  
5:29:21 PM: npm ERR! code ERESOLVE  
5:29:21 PM: npm ERR! ERESOLVE could not resolve  
5:29:21 PM: npm ERR!  
5:29:21 PM: npm ERR! While resolving: react-tilt@0.1.4  
5:29:21 PM: Failed during stage ‘building site’: Build script returned non-zero exit code: 1 ([Search results for '"non-zero exit code: 1"' - Netlify Support Forums](https://ntl.fyi/exit-code-1))  
5:29:21 PM: npm ERR! Found: react@18.2.0  
5:29:21 PM: npm ERR! node\_modules/react  
5:29:21 PM: npm ERR! react@“^18.2.0” from the root project  
5:29:21 PM: npm ERR! peer react@“^16.8.0 || ^17.0.0 || ^18.0.0” from @react-spring/animated@9.6.1  
5:29:21 PM: npm ERR! node\_modules/@react-spring/animated  
5:29:21 PM: npm ERR! @react-spring/animated@“~9.6.1” from @react-spring/core@9.6.1  
5:29:21 PM: npm ERR! node\_modules/@react-spring/core  
5:29:21 PM: npm ERR! @react-spring/core@“~9.6.1” from @react-spring/three@9.6.1  
5:29:21 PM: npm ERR! node\_modules/@react-spring/three  
5:29:21 PM: npm ERR! @react-spring/three@“~9.6.1” from @react-three/drei@9.57.0  
5:29:21 PM: npm ERR! node\_modules/@react-three/drei  
5:29:21 PM: npm ERR! @react-spring/animated@“~9.6.1” from @react-spring/three@9.6.1  
5:29:21 PM: npm ERR! node\_modules/@react-spring/three  
5:29:21 PM: npm ERR! @react-spring/three@“~9.6.1” from @react-three/drei@9.57.0  
5:29:21 PM: npm ERR! node\_modules/@react-three/drei  
5:29:21 PM: npm ERR! @react-three/drei@“^9.57.0” from the root project  
5:29:21 PM: npm ERR! 17 more (@react-spring/core, @react-spring/shared, …)  
5:29:21 PM: npm ERR!  
5:29:21 PM: npm ERR! Could not resolve dependency:  
5:29:21 PM: npm ERR! peer react@“^15.0.0 || ^16.0.0-beta || ^16.0.0” from react-tilt@0.1.4  
5:29:21 PM: npm ERR! node\_modules/react-tilt  
5:29:21 PM: npm ERR! react-tilt@“^0.1.4” from the root project  
5:29:21 PM: npm ERR!  
5:29:21 PM: npm ERR! Conflicting peer dependency: react@16.14.0  
5:29:21 PM: npm ERR! node\_modules/react  
5:29:21 PM: npm ERR! peer react@“^15.0.0 || ^16.0.0-beta || ^16.0.0” from react-tilt@0.1.4  
5:29:21 PM: npm ERR! node\_modules/react-tilt  
5:29:21 PM: npm ERR! react-tilt@“^0.1.4” from the root project  
5:29:21 PM: npm ERR!  
5:29:21 PM: npm ERR! Fix the upstream dependency conflict, or retry  
5:29:21 PM: npm ERR! this command with --force, or --legacy-peer-deps  
5:29:21 PM: npm ERR! to accept an incorrect (and potentially broken) dependency resolution.  
5:29:21 PM: npm ERR!  
5:29:21 PM: npm ERR! See /opt/buildhome/.npm/eresolve-report.txt for a full report.  
5:29:21 PM: npm ERR! A complete log of this run can be found in:  
5:29:21 PM: npm ERR! /opt/buildhome/.npm/\_logs/2023-03-06T15\_29\_20\_602Z-debug-0.log  
5:29:21 PM: Error during npm install  
5:29:21 PM: Build was terminated: Build script returned non-zero exit code: 1  
5:29:21 PM: Failing build: Failed to build site  
5:29:21 PM: Finished processing build request in 6.236s

---

<div class="post-metadata">

**Author:** ![clarnx](https://sea1.discourse-cdn.com/netlify/user_avatar/answers.netlify.com/clarnx/32/40777_2.png) [@clarnx](https://answers.netlify.com/u/clarnx)\
**Post date:** [March 6, 2023, 9:34pm UTC](https://answers.netlify.com/t/conflicting-peer-dependency-it-builds-fine-locally-but-i-dont-know-what-to-do-now-especially-that-im-trying-to-deploy-a-three-js-web-app-which-works-fine-on-desktop-but-the-images-doesnt-render-and-crash-on-mobile-for-some-reason/87136/2 "2023-03-06T21:34:03Z")

</div>

> [@mahmoudhosnyomran97](#):
>
> 5:29:21 PM: npm ERR! Fix the upstream dependency conflict, or retry  
> 5:29:21 PM: npm ERR! this command with --force, or --legacy-peer-deps

Hi @mahmoudhosnyomran97, thanks for the post and welcome.  
Looks like some of the packages you are using are not compatible with React 18.2.0.

There are two ways to resolve this issue.

1. Either you update your packages to the latest version.  
**OR**
2. Allow legacy peer dependencies by using the command to install packages before you deploy.

```auto
npm install --legacy-peer-deps

```

Let me know the outcome.

Thanks.

---

<div class="post-metadata">

**Author:** ![nathanmartin](https://sea1.discourse-cdn.com/netlify/user_avatar/answers.netlify.com/nathanmartin/32/30845_2.png) [@nathanmartin](https://answers.netlify.com/u/nathanmartin)\
**Post date:** [March 6, 2023, 9:38pm UTC](https://answers.netlify.com/t/conflicting-peer-dependency-it-builds-fine-locally-but-i-dont-know-what-to-do-now-especially-that-im-trying-to-deploy-a-three-js-web-app-which-works-fine-on-desktop-but-the-images-doesnt-render-and-crash-on-mobile-for-some-reason/87136/3 "2023-03-06T21:38:31Z")

</div>

Or 3. Use the `NPM_FLAGS` environment variable to define the flag to be used by Netlify at build time:

> [@Deploy failed today: Build was terminated: Build script returned non-zero exit code: 1](https://answers.netlify.com/t/deploy-failed-today-build-was-terminated-build-script-returned-non-zero-exit-code-1/64450/2):
>
> The error is a peer dependency conflict relating to versions of react, which provides guidance on how you can attempt to resolve it: 11:06:39 AM: npm ERR! Fix the upstream dependency conflict, or retry 11:06:39 AM: npm ERR! this command with --force, or --legacy-peer-deps 11:06:39 AM: npm ERR! to accept an incorrect (and potentially broken) dependency resolution. It suggests you can run npm install --force or npm install --legacy-peer-deps. To do this on Netlify you can use the [NPM\_FLAGS](https://docs.netlify.com/configure-builds/manage-dependencies/#npm) envi…

---

<div class="post-metadata">

**Author:** ![mahmoudhosnyomran97](https://sea1.discourse-cdn.com/netlify/user_avatar/answers.netlify.com/mahmoudhosnyomran97/32/48566_2.png) [@mahmoudhosnyomran97](https://answers.netlify.com/u/mahmoudhosnyomran97)\
**Post date:** [March 9, 2023, 6:56am UTC](https://answers.netlify.com/t/conflicting-peer-dependency-it-builds-fine-locally-but-i-dont-know-what-to-do-now-especially-that-im-trying-to-deploy-a-three-js-web-app-which-works-fine-on-desktop-but-the-images-doesnt-render-and-crash-on-mobile-for-some-reason/87136/4 "2023-03-09T06:56:30Z")

</div>

> [@Deploy failed today: Build was terminated: Build script returned non-zero exit code: 1](https://answers.netlify.com/t/deploy-failed-today-build-was-terminated-build-script-returned-non-zero-exit-code-1/64450/2):
>
> `--force`

hi @clarnx first thank you for taking out of your time to reply and help me  
second i actually tried what you suggested it runs fine locally on my machine but i still get the same error while i try to deploy it through netlify and i’m not sure what is the problem now but i still get the same error though.

---

<div class="post-metadata">

**Author:** ![mahmoudhosnyomran97](https://sea1.discourse-cdn.com/netlify/user_avatar/answers.netlify.com/mahmoudhosnyomran97/32/48566_2.png) [@mahmoudhosnyomran97](https://answers.netlify.com/u/mahmoudhosnyomran97)\
**Post date:** [March 9, 2023, 6:58am UTC](https://answers.netlify.com/t/conflicting-peer-dependency-it-builds-fine-locally-but-i-dont-know-what-to-do-now-especially-that-im-trying-to-deploy-a-three-js-web-app-which-works-fine-on-desktop-but-the-images-doesnt-render-and-crash-on-mobile-for-some-reason/87136/5 "2023-03-09T06:58:13Z")

</div>

hi @nathanmartin first thank you for taking out of your time to reply and help me  
second i actually tried what you suggested but unfortunately i still get the same error while i try to deploy it through netlify and i’m not sure what is the problem now but i still get the same error though i tried both the legacy and the force method.

---

<div class="post-metadata">

**Author:** ![nathanmartin](https://sea1.discourse-cdn.com/netlify/user_avatar/answers.netlify.com/nathanmartin/32/30845_2.png) [@nathanmartin](https://answers.netlify.com/u/nathanmartin)\
**Post date:** [March 9, 2023, 7:14am UTC](https://answers.netlify.com/t/conflicting-peer-dependency-it-builds-fine-locally-but-i-dont-know-what-to-do-now-especially-that-im-trying-to-deploy-a-three-js-web-app-which-works-fine-on-desktop-but-the-images-doesnt-render-and-crash-on-mobile-for-some-reason/87136/6 "2023-03-09T07:14:42Z")

</div>

@mahmoudhosnyomran97 There’s no guarantee that any one thing will fix every problem, as it’s possible there might be more than one thing wrong.

What was the failed build log when you performed your build with the `NPM_FLAGS` value set to `--legacy-peer-deps`?

---

<div class="post-metadata">

**Author:** ![mahmoudhosnyomran97](https://sea1.discourse-cdn.com/netlify/user_avatar/answers.netlify.com/mahmoudhosnyomran97/32/48566_2.png) [@mahmoudhosnyomran97](https://answers.netlify.com/u/mahmoudhosnyomran97)\
**Post date:** [March 9, 2023, 8:28am UTC](https://answers.netlify.com/t/conflicting-peer-dependency-it-builds-fine-locally-but-i-dont-know-what-to-do-now-especially-that-im-trying-to-deploy-a-three-js-web-app-which-works-fine-on-desktop-but-the-images-doesnt-render-and-crash-on-mobile-for-some-reason/87136/7 "2023-03-09T08:28:20Z")

</div>

> [@nathanmartin](#):
>
> `--legacy-peer-deps`

same as before

10:27:08 AM: build-image version: f14e228ec2dbb3d6f5ee2f499343e1468b859b97 (focal)  
10:27:08 AM: buildbot version: f14e228ec2dbb3d6f5ee2f499343e1468b859b97  
10:27:09 AM: Fetching cached dependencies  
10:27:09 AM: Failed to fetch cache, continuing with build  
10:27:09 AM: Starting to prepare the repo for build  
10:27:09 AM: No cached dependencies found. Cloning fresh repo  
10:27:09 AM: git clone --filter=blob:none [GitHub - mahmoudhosnyomran97/my-3D-portfolio](https://github.com/mahmoudhosnyomran97/my-portfolio)  
10:27:09 AM: Preparing Git Reference refs/heads/master  
10:27:10 AM: Parsing package.json dependencies  
10:27:11 AM: Starting build script  
10:27:11 AM: Installing dependencies  
10:27:11 AM: Python version set to 2.7  
10:27:11 AM: v16.19.1 is already installed.  
10:27:12 AM: Now using node v16.19.1 (npm v8.19.3)  
10:27:12 AM: Enabling Node.js Corepack  
10:27:12 AM: Started restoring cached build plugins  
10:27:12 AM: Finished restoring cached build plugins  
10:27:12 AM: Attempting Ruby version 2.7.2, read from environment  
10:27:13 AM: Using Ruby version 2.7.2  
10:27:13 AM: Using PHP version 8.0  
10:27:13 AM: Started restoring cached corepack dependencies  
10:27:13 AM: Finished restoring cached corepack dependencies  
10:27:13 AM: No npm workspaces detected  
10:27:13 AM: Started restoring cached node modules  
10:27:13 AM: Finished restoring cached node modules  
10:27:13 AM: Installing npm packages using npm version 8.19.3  
10:27:15 AM: npm ERR! code ERESOLVE  
10:27:15 AM: npm ERR! ERESOLVE could not resolve  
10:27:15 AM: npm ERR!  
10:27:15 AM: npm ERR! While resolving: react-tilt@0.1.4  
10:27:15 AM: npm ERR! Found: react@18.2.0  
10:27:15 AM: Failed during stage ‘building site’: Build script returned non-zero exit code: 1 ([Search results for '"non-zero exit code: 1"' - Netlify Support Forums](https://ntl.fyi/exit-code-1))  
10:27:15 AM: npm ERR! node\_modules/react  
10:27:15 AM: npm ERR! react@“^18.2.0” from the root project  
10:27:15 AM: npm ERR! peer react@“^16.8.0 || ^17.0.0 || ^18.0.0” from @react-spring/animated@9.6.1  
10:27:15 AM: npm ERR! node\_modules/@react-spring/animated  
10:27:15 AM: npm ERR! @react-spring/animated@“~9.6.1” from @react-spring/core@9.6.1  
10:27:15 AM: npm ERR! node\_modules/@react-spring/core  
10:27:15 AM: npm ERR! @react-spring/core@“~9.6.1” from @react-spring/three@9.6.1  
10:27:15 AM: npm ERR! node\_modules/@react-spring/three  
10:27:15 AM: npm ERR! @react-spring/three@“~9.6.1” from @react-three/drei@9.57.0  
10:27:15 AM: npm ERR! node\_modules/@react-three/drei  
10:27:15 AM: npm ERR! @react-spring/animated@“~9.6.1” from @react-spring/three@9.6.1  
10:27:15 AM: npm ERR! node\_modules/@react-spring/three  
10:27:15 AM: npm ERR! @react-spring/three@“~9.6.1” from @react-three/drei@9.57.0  
10:27:15 AM: npm ERR! node\_modules/@react-three/drei  
10:27:15 AM: npm ERR! @react-three/drei@“^9.57.0” from the root project  
10:27:15 AM: npm ERR! 17 more (@react-spring/core, @react-spring/shared, …)  
10:27:15 AM: npm ERR!  
10:27:15 AM: npm ERR! Could not resolve dependency:  
10:27:15 AM: npm ERR! peer react@“^15.0.0 || ^16.0.0-beta || ^16.0.0” from react-tilt@0.1.4  
10:27:15 AM: npm ERR! node\_modules/react-tilt  
10:27:15 AM: npm ERR! react-tilt@“^0.1.4” from the root project  
10:27:15 AM: npm ERR!  
10:27:15 AM: npm ERR! Conflicting peer dependency: react@16.14.0  
10:27:15 AM: npm ERR! node\_modules/react  
10:27:15 AM: npm ERR! peer react@“^15.0.0 || ^16.0.0-beta || ^16.0.0” from react-tilt@0.1.4  
10:27:15 AM: npm ERR! node\_modules/react-tilt  
10:27:15 AM: npm ERR! react-tilt@“^0.1.4” from the root project  
10:27:15 AM: npm ERR!  
10:27:15 AM: npm ERR! Fix the upstream dependency conflict, or retry  
10:27:15 AM: npm ERR! this command with --force, or --legacy-peer-deps  
10:27:15 AM: npm ERR! to accept an incorrect (and potentially broken) dependency resolution.  
10:27:15 AM: npm ERR!  
10:27:15 AM: npm ERR! See /opt/buildhome/.npm/eresolve-report.txt for a full report.  
10:27:15 AM: npm ERR! A complete log of this run can be found in:  
10:27:15 AM: npm ERR! /opt/buildhome/.npm/\_logs/2023-03-09T08\_27\_13\_735Z-debug-0.log  
10:27:15 AM: Error during npm install  
10:27:15 AM: Build was terminated: Build script returned non-zero exit code: 1  
10:27:15 AM: Failing build: Failed to build site  
10:27:15 AM: Finished processing build request in 6.391s

---

<div class="post-metadata">

**Author:** ![nathanmartin](https://sea1.discourse-cdn.com/netlify/user_avatar/answers.netlify.com/nathanmartin/32/30845_2.png) [@nathanmartin](https://answers.netlify.com/u/nathanmartin)\
**Post date:** [March 9, 2023, 9:03am UTC](https://answers.netlify.com/t/conflicting-peer-dependency-it-builds-fine-locally-but-i-dont-know-what-to-do-now-especially-that-im-trying-to-deploy-a-three-js-web-app-which-works-fine-on-desktop-but-the-images-doesnt-render-and-crash-on-mobile-for-some-reason/87136/8 "2023-03-09T09:03:54Z")

</div>

> [@mahmoudhosnyomran97](#):
>
> 10:27:15 AM: npm ERR! Fix the upstream dependency conflict, or retry  
> 10:27:15 AM: npm ERR! this command with --force, or --legacy-peer-deps

The fact it still says this, makes me suspicious that it did not run with `--legacy-peer-deps`.

Have you confirmed that the environment variable `NPM_FLAGS` is set correctly?

---

<div class="post-metadata">

**Author:** ![clarnx](https://sea1.discourse-cdn.com/netlify/user_avatar/answers.netlify.com/clarnx/32/40777_2.png) [@clarnx](https://answers.netlify.com/u/clarnx)\
**Post date:** [March 9, 2023, 1:25pm UTC](https://answers.netlify.com/t/conflicting-peer-dependency-it-builds-fine-locally-but-i-dont-know-what-to-do-now-especially-that-im-trying-to-deploy-a-three-js-web-app-which-works-fine-on-desktop-but-the-images-doesnt-render-and-crash-on-mobile-for-some-reason/87136/9 "2023-03-09T13:25:49Z")

</div>

Hi @mahmoudhosnyomran97, in addition to @nathanmartin’s suggestion, kindly add the environment variables by following the steps below.  
I have tried it out myself by testing it with your repository.

The following steps below should solve the problem and deploy your site successfully.

1. Go to your project in Netlify and click on your site name.
2. Click on the `Site settings` button or tab on the right most side of the menu.
3. Click on Environment variables (New) on the left pane menu.
4. Click on the `Add Variable` button.
5. Type `CI` into the **key** input field, and then type `false` into the **values** field, and then click on the `Create variable` button.
6. Repeat the steps from step 4 to add another Environment variable by setting the **key** input to `NPM_FLAGS` and set **values** input to `--legacy-peer-deps`.
7. Once you are done click on the `Deploys` tab menu at the top of the page and then click on the `Trigger deploy` button and select `Clear cache and deploy site` option.

Let me know the outcome.

Thanks.

---

<div class="post-metadata">

**Author:** ![mahmoudhosnyomran97](https://sea1.discourse-cdn.com/netlify/user_avatar/answers.netlify.com/mahmoudhosnyomran97/32/48566_2.png) [@mahmoudhosnyomran97](https://answers.netlify.com/u/mahmoudhosnyomran97)\
**Post date:** [March 9, 2023, 2:22pm UTC](https://answers.netlify.com/t/conflicting-peer-dependency-it-builds-fine-locally-but-i-dont-know-what-to-do-now-especially-that-im-trying-to-deploy-a-three-js-web-app-which-works-fine-on-desktop-but-the-images-doesnt-render-and-crash-on-mobile-for-some-reason/87136/10 "2023-03-09T14:22:31Z")

</div>

that worked like a charm thank you so much clarnx for your help and support and i want to thank you too @nathanmartin for your help your suggestion might was the solution from the beginning and may be i didn’t do it correctly but anyways though i really appreciate your help as well and both your kind replies with my best regards.

---

<div class="post-metadata">

**Author:** ![SamO](https://sea1.discourse-cdn.com/netlify/user_avatar/answers.netlify.com/samo/32/41847_2.png) [@SamO](https://answers.netlify.com/u/SamO)\
**Post date:** [March 9, 2023, 3:49pm UTC](https://answers.netlify.com/t/conflicting-peer-dependency-it-builds-fine-locally-but-i-dont-know-what-to-do-now-especially-that-im-trying-to-deploy-a-three-js-web-app-which-works-fine-on-desktop-but-the-images-doesnt-render-and-crash-on-mobile-for-some-reason/87136/11 "2023-03-09T15:49:10Z")

</div>

Thanks for confirming you found your solution! I’m glad to hear it.

---

<div class="post-metadata">

**Author:** ![vimuths123](https://sea1.discourse-cdn.com/netlify/user_avatar/answers.netlify.com/vimuths123/32/49657_2.png) [@vimuths123](https://answers.netlify.com/u/vimuths123)\
**Post date:** [April 7, 2023, 10:11am UTC](https://answers.netlify.com/t/conflicting-peer-dependency-it-builds-fine-locally-but-i-dont-know-what-to-do-now-especially-that-im-trying-to-deploy-a-three-js-web-app-which-works-fine-on-desktop-but-the-images-doesnt-render-and-crash-on-mobile-for-some-reason/87136/12 "2023-04-07T10:11:27Z")

</div>

An awesome solution that saved lots of my time. Do you know why my .toml file with this failed and your solution worked?

my netlify.toml

```auto
[build]
  command = "npm install --legacy-peer-deps --force && npm run build"

```

---

<div class="post-metadata">

**Author:** ![clarnx](https://sea1.discourse-cdn.com/netlify/user_avatar/answers.netlify.com/clarnx/32/40777_2.png) [@clarnx](https://answers.netlify.com/u/clarnx)\
**Post date:** [April 7, 2023, 2:43pm UTC](https://answers.netlify.com/t/conflicting-peer-dependency-it-builds-fine-locally-but-i-dont-know-what-to-do-now-especially-that-im-trying-to-deploy-a-three-js-web-app-which-works-fine-on-desktop-but-the-images-doesnt-render-and-crash-on-mobile-for-some-reason/87136/13 "2023-04-07T14:43:10Z")

</div>

Hi @vimuths123, thanks for the question and welcome.  
Glad to know my suggestion also helped resolve your problem.

Regarding your question there could be a lot of reasons why the build command in the `.toml` file fails. I can’t tell for sure what the cause of the problem might be unless I see the build errors.

However what I do know is that the **NPM\_FLAGS** environment variable is used to indicate the flags to pass to the npm install command.

Thanks.

---

<div class="post-metadata">

**Author:** ![Ahmad\_Bakr](https://avatars.discourse-cdn.com/v4/letter/a/4491bb/32.png) [@Ahmad\_Bakr](https://answers.netlify.com/u/Ahmad_Bakr)\
**Post date:** [August 6, 2023, 4:59pm UTC](https://answers.netlify.com/t/conflicting-peer-dependency-it-builds-fine-locally-but-i-dont-know-what-to-do-now-especially-that-im-trying-to-deploy-a-three-js-web-app-which-works-fine-on-desktop-but-the-images-doesnt-render-and-crash-on-mobile-for-some-reason/87136/14 "2023-08-06T16:59:50Z")

</div>

It really works thank you very much 😀

---

<div class="post-metadata">

**Author:** ![sunny7899](https://sea1.discourse-cdn.com/netlify/user_avatar/answers.netlify.com/sunny7899/32/63851_2.png) [@sunny7899](https://answers.netlify.com/u/sunny7899)\
**Post date:** [September 14, 2024, 10:19am UTC](https://answers.netlify.com/t/conflicting-peer-dependency-it-builds-fine-locally-but-i-dont-know-what-to-do-now-especially-that-im-trying-to-deploy-a-three-js-web-app-which-works-fine-on-desktop-but-the-images-doesnt-render-and-crash-on-mobile-for-some-reason/87136/15 "2024-09-14T10:19:56Z")

</div>

Thanks for the solution working fine on my system
