[Fixed] Deploy React with Netlify (build.command failed)

Поделиться
HTML-код
  • Опубликовано: 28 авг 2024
  • React deploy with Netlify, via Github.
    My solution to "build.command" failed
    Command failed with exit 1

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

  • @jonathan-uwagboepromise3139
    @jonathan-uwagboepromise3139 Год назад +2

    Best approach ever after years of trying lol. Thanks man.

  • @nehal2192
    @nehal2192 11 месяцев назад +2

    You just solved my problem within two minute. Thanks man

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

    thank you, i've been up for ages tryna figure this out!!!

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

    Thanks Victor, It works

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

    My man. Good lookin out. And nice guitar 🤙🏻

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

      Heya! Hope it works for you. And thanks, it's indeed a nice guitar.

  • @victorbaptista7388
    @victorbaptista7388  Год назад +3

    ** UPDATE! **
    #1 Make sure all paths in your projects are relative to the scope of src, use e.g: "../../". Don't use a longer path that includes your own computer, e.g: "C:\Users\Username\Documents\Project" - that's outside of Netlify's scope.
    #2 In Deploy Settings, make sure these configs are set based on the package management chosen for your project:
    NPM
    Build command: CI=false yarn build
    Publish directory: build/
    YARN
    Build command: CI=false npm run build
    Publish directory: build/
    ** CI=true will treat any warning from your project as an error, that's why we use CI=false.

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

    Thank you for the workaround !

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

    Thank you so much bro for making this video ❤️

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

    it works for me! thank you so much bro😭
    you saved my life!

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

    I love you!

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

    Legend! Thank you so much!

  • @mel.w1155
    @mel.w1155 Год назад +1

    It works! amazing!

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

    Thanks! It helped a lot!

  • @JohnDoe-ej6vm
    @JohnDoe-ej6vm 2 года назад +2

    i am still facing same error tried a lot of things.
    9:27:45 PM: Creating deploy upload records
    9:27:45 PM: Failing build: Failed to build site
    9:27:45 PM: Failed during stage 'building site': Deploy directory 'build' does not exist

    • @larbizard
      @larbizard 2 года назад +5

      You need to commit yout build folder to your repo. Comment it in the .gitignore file

    • @gevolgdev
      @gevolgdev 2 года назад +5

      i have solution: open package.json and change build for it ---> "build": "CI= react-scripts build". this work for me
      ps: sorry by my english

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

      @@larbizard what do you mean bro

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

      @@cryptocrazeee4672 it's not a good practice but it was the solution I used at the moment. You need to push the build folder to your repository

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

      @@larbizard i did this and it worked. build error is gone. thank u

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

    Thanks for sharing

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

    thanks!

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

    worked welll..thanks

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

    a humble liar

  • @user-js8tb9wc9z
    @user-js8tb9wc9z 3 месяца назад

    easy and amazing stupid fix jajaja

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

    very bad