Solved Command failed with exit code 1 when deploying react app in Netlify (2022)

Поделиться
HTML-код
  • Опубликовано: 13 сен 2024
  • I will show you guys how to quickly fix this common issue when adding a website to netlify
    Command failed with exit code 1: npm run build (ntl.fyi/exit-c...)
    Treating warnings as errors because process.env.CI = true.
    Most CI servers set it automatically.
    Make sure You subscribe to My Channel
    🚩 Subscribe - bit.ly/3QnESnI
    🚩 Medium profile- / freelancingcult
    🚩 Tiktok - / fullstackproject
    Lets join and talk on discord
    🚩 / discord

Комментарии • 61

  • @bgmieditscy
    @bgmieditscy 6 месяцев назад

    listen guys: THE ONLY GENUINELY WORKING AND LEGIT VIDEO. I SAW 15 CLICKBAITS BEFORE COMING HERE. thank bro

  • @harshvaghani4283
    @harshvaghani4283 Год назад

    Thank you! After using this environment variable, I just clicked on retry deploy and it worked like a charm! Thanks a lot ♥

    • @ene_andre
      @ene_andre Год назад

      Hi, mine is insisting that the environment variable name must have an underscore, how did you do yours??

  • @ismoil3075
    @ismoil3075 Год назад +2

    Thanks man, you saved my nerves !

  • @user-pv7xc3cn6g
    @user-pv7xc3cn6g 8 месяцев назад

    Thank you so much. Could you pls expain further why CI should be false ? thank you .

    • @thefullstackproject
      @thefullstackproject  8 месяцев назад

      When deploying to Netlify, the environment variable CI is set to true by default, which can cause certain features in an application to be treated as errors instead of warnings. To prevent this, you should unset the CI environment variable by setting it to false.

  • @knightofchess6900
    @knightofchess6900 Год назад

    Your trick liberated me lol! Thank you.

  • @abhishekdubey1985
    @abhishekdubey1985 Год назад

    ek no..1 bhai it worked love u 3000

  • @diegoalfredo2467
    @diegoalfredo2467 9 месяцев назад

    that fu****g worked, thanks a lot

  • @MorningSunnySmile
    @MorningSunnySmile 8 месяцев назад

    Thank you!!! You saved my life today :D

  • @blue_berry_pie64
    @blue_berry_pie64 Год назад

    thank you so so much, I have spent a lot of time try to deploy react app on Netlify

  • @office394
    @office394 Год назад

    thanks bro, this video every helpful, from 2 days i am trying to solve this issue...

  • @firomsahika4773
    @firomsahika4773 8 месяцев назад

    thanks it works for me

  • @haiderrafi1267
    @haiderrafi1267 Год назад

    Thanks Man, it Worked!!!

  • @silviolutz5850
    @silviolutz5850 Год назад

    thank you. It worked setting CI to false

  • @sawyer4981
    @sawyer4981 Год назад

    Thank you! Earned a sub.

  • @navaneetha.a258
    @navaneetha.a258 5 месяцев назад

    There no environment variables in deployed

  • @arvindvish2588
    @arvindvish2588 2 года назад +2

    not work for me

    • @thefullstackproject
      @thefullstackproject  2 года назад +2

      Whats the issue can you please explain I can help

    • @arvindvish2588
      @arvindvish2588 2 года назад

      @@thefullstackproject my issue was solved, actually I made a mistake in my file by importing the file name by small letters, btw thanks for reply

    • @thefullstackproject
      @thefullstackproject  2 года назад +1

      @@arvindvish2588 no problem

    • @dharmkumar3861
      @dharmkumar3861 Год назад

      i think know you ,where are you from arvind

  • @avanikantkumarkashyap2064
    @avanikantkumarkashyap2064 9 месяцев назад

    Very helpful thanks bro mind explaining why does it work?

  • @carbellsarfo
    @carbellsarfo 11 месяцев назад

    It worked. thanks a lot.

  • @gregorpanteleyevicmelehov9584
    @gregorpanteleyevicmelehov9584 Год назад +1

    Not work for me because ı don't have any variable name. Can you help me?

  • @moinali3163
    @moinali3163 Год назад

    It Worked, Great!

  • @mananbahl4842
    @mananbahl4842 Год назад

    Thank you bro!

  • @IllIIIIIIllll
    @IllIIIIIIllll 9 месяцев назад

    Thank you bro🙌🙌

  • @siva4456
    @siva4456 7 месяцев назад

    Thanks man

  • @rohitk472
    @rohitk472 7 месяцев назад

    worked ,,,,
    thanks bhai

  • @lizzard2023
    @lizzard2023 Год назад

    It worked thank you !!!!

  • @minhthanhnguyen8936
    @minhthanhnguyen8936 Год назад

    thank you so much

  • @arunkumar435
    @arunkumar435 10 месяцев назад

    After use " CI false " ,the initialization is completed.but, the building is failed...
    Can you help me..?

    • @thefullstackproject
      @thefullstackproject  9 месяцев назад +1

      does the build works fine locally?

    • @arunkumar435
      @arunkumar435 9 месяцев назад

      @@thefullstackproject Yes, it worked well in the local host

  • @MrCavid1991
    @MrCavid1991 9 месяцев назад

    Not working in my case.Here is my error message
    11:15:12 AM: Failed during stage "Install dependencies": dependency_installation script returned non-zero exit code: 1
    11:15:12 AM: npm ERR! code ERESOLVE
    11:15:12 AM: npm ERR! ERESOLVE could not resolve
    11:15:12 AM: npm ERR!
    11:15:12 AM: npm ERR! While resolving: @mui/styles@5.14.18
    11:15:12 AM: npm ERR! Found: react@18.2.0
    11:15:12 AM: npm ERR! node_modules/react
    11:15:12 AM: npm ERR! dev react@"^18.2.0" from the root project
    11:15:12 AM: npm ERR! peer react@">=16.8.0" from @emotion/react@11.11.1
    11:15:12 AM: npm ERR! node_modules/@emotion/react
    11:15:12 AM: npm ERR! @emotion/react@"^11.11.1" from the root project
    11:15:12 AM: npm ERR! peer @emotion/react@"^11.0.0-rc.0" from @emotion/styled@11.11.0
    11:15:12 AM: npm ERR! node_modules/@emotion/styled
    11:15:12 AM: npm ERR! peerOptional @emotion/styled@"^11.3.0" from @mui/material@5.14.18
    11:15:12 AM: npm ERR! node_modules/@mui/material
    11:15:12 AM: npm ERR! @mui/material@"^5.14.18" from the root project
    11:15:12 AM: npm ERR! 2 more (@mui/icons-material, react-material-ui-carousel)
    11:15:12 AM: npm ERR! 3 more (@mui/styled-engine, @mui/system, react-material-ui-carousel)
    11:15:12 AM: npm ERR! 4 more (@mui/material, @mui/styled-engine, @mui/system, react-material-ui-carousel)
    11:15:12 AM: npm ERR! 53 more (@emotion/styled, ...)
    11:15:12 AM: npm ERR!
    11:15:12 AM: npm ERR! Could not resolve dependency:
    11:15:12 AM: npm ERR! peer react@"^17.0.0" from @mui/styles@5.14.18
    11:15:12 AM: npm ERR! node_modules/@mui/styles
    11:15:12 AM: npm ERR! @mui/styles@"^5.14.18" from the root project
    11:15:12 AM: npm ERR!
    11:15:12 AM: npm ERR! Conflicting peer dependency: react@17.0.2
    11:15:12 AM: npm ERR! node_modules/react
    11:15:12 AM: npm ERR! peer react@"^17.0.0" from @mui/styles@5.14.18
    11:15:12 AM: npm ERR! node_modules/@mui/styles
    11:15:12 AM: npm ERR! @mui/styles@"^5.14.18" from the root project
    11:15:12 AM: npm ERR!
    11:15:12 AM: npm ERR! Fix the upstream dependency conflict, or retry
    11:15:12 AM: npm ERR! this command with --force or --legacy-peer-deps
    11:15:12 AM: npm ERR! to accept an incorrect (and potentially broken) dependency resolution.
    11:15:12 AM: npm ERR!
    11:15:12 AM: npm ERR!
    11:15:12 AM: npm ERR! For a full report see:
    11:15:12 AM: npm ERR! /opt/buildhome/.npm/_logs/2023-11-29T07_15_11_293Z-eresolve-report.txt
    11:15:12 AM: npm ERR! A complete log of this run can be found in: /opt/buildhome/.npm/_logs/2023-11-29T07_15_11_293Z-debug-0.log
    11:15:12 AM: Error during npm install
    11:15:12 AM: Failing build: Failed to install dependencies

    • @thefullstackproject
      @thefullstackproject  9 месяцев назад

      can you try the steps in here please stackoverflow.com/questions/64468843/netlify-deployment-failed-during-stage-building-site-build-script-returned-n

    • @MrCavid1991
      @MrCavid1991 9 месяцев назад

      @@thefullstackproject i already did this. nothing works( thank you for your answer by the way

  • @Kolpona_kitchen
    @Kolpona_kitchen Год назад

    Thank you very much

  • @Kimlong447
    @Kimlong447 Год назад

    thanks

  • @piyushaggarwal9484
    @piyushaggarwal9484 7 месяцев назад

    thnx a lot

  • @78vijayk37
    @78vijayk37 Год назад

    Environmental variable new varaiable keluthu bro

  • @oleh-umert257
    @oleh-umert257 Год назад

    Thank you very very very ... 10000 times after ... very much for uploading this silution!!!!!!!!!

  • @namanguntiwar9218
    @namanguntiwar9218 2 месяца назад

    I am still stuck with error

  • @ene_andre
    @ene_andre Год назад

    Hello, mine is insisting that the environment variable name must have an underscore, how can i fix this?

    • @thefullstackproject
      @thefullstackproject  Год назад

      What was the name you added to env

    • @ene_andre
      @ene_andre Год назад

      @@thefullstackproject I've been able to change it to CI, it works perfectly well now, thank you.

  • @gollapallisivaji776
    @gollapallisivaji776 6 месяцев назад

    Hi Bro i am getting build issue can you respond plzz

  • @sktamim_01
    @sktamim_01 Год назад

    It worked for me

  • @sktamim_01
    @sktamim_01 Год назад

    Thank you so much brother