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

Not finding build:prod #68

Open
varndellwagglebee opened this issue Dec 8, 2022 · 9 comments
Open

Not finding build:prod #68

varndellwagglebee opened this issue Dec 8, 2022 · 9 comments

Comments

@varndellwagglebee
Copy link

varndellwagglebee commented Dec 8, 2022

Error:

Run Borales/actions-yarn@v4.2.0
/usr/local/bin/yarn build:prod "set \"GENERATE_SOURCEMAP=false\" && react-scripts build"
yarn run v[1](https://github.com/Stillpoint-Software/wagglebee.ui/actions/runs/3651200718/jobs/6168130627#step:7:1).22.19
error Command "build:prod" not found.
info Visit https://yarnpkg.com/en/docs/cli/run for documentation about this command.
Error: The process '/usr/local/bin/yarn' failed with exit code 1

Job steps:

build_and_deploy_job:
  
    runs-on: ubuntu-latest
    name: Test and Build     
    steps:
      - name: directory
        run: echo ${{ env.DEFAULT-REPOSITORY }}
        
      - name: Checkout
        uses: actions/checkout@v3
        with:
          path:  ${{ env.DEFAULT-REPOSITORY }}
        
      - name: Set Node.js 16.x
        uses: actions/setup-node@v3.5.1
        with:
          node-version: 16.x
          cache: 'yarn'
          cache-dependency-path: ${{ env.DEFAULT-REPOSITORY }}
        
      - name: Run Yarn install
        uses: Borales/actions-yarn@v4.2.0
        with:
          cmd: install # will run `yarn install` command
          dir: ${{ env.DEFAULT-REPOSITORY }}
                    
      - name: Build production bundle
        uses: Borales/actions-yarn@v4.2.0
        with:
          cmd: build:prod "set \"GENERATE_SOURCEMAP=false\" && react-scripts build"  # will run `yarn build:prod  command
          dir: ${{ env.DEFAULT-REPOSITORY }}

PROJECT Structure:

software/waggle/packages/website

The yarn lock file and the package.json file are in the "WEBSITE" sub folder.

@Borales
Copy link
Owner

Borales commented Dec 8, 2022

@varndellwagglebee does it work for you locally?
yarn build:prod "set \"GENERATE_SOURCEMAP=false\" && react-scripts build"?

I checked a sub-folder command - it works fine. I think it's something with the command syntax itself

@varndellwagglebee
Copy link
Author

Yes, I can run yarn run build:prod locally.

@Borales
Copy link
Owner

Borales commented Dec 8, 2022

@varndellwagglebee with the rest of it? you posted cmd: build:prod "set \"GENERATE_SOURCEMAP=false\" && react-scripts build" as your command.

@varndellwagglebee
Copy link
Author

Yes, This is the script for build:prod
"build:prod": "set "GENERATE_SOURCEMAP=false" && react-scripts build",

@Borales
Copy link
Owner

Borales commented Dec 8, 2022

@varndellwagglebee ok, then you have an error in your yml file above. It has to be cmd: build:prod

@varndellwagglebee
Copy link
Author

I've tried build:prod and get the same error

@Borales
Copy link
Owner

Borales commented Dec 8, 2022

@varndellwagglebee then double-check if you really get the value in dir: ${{ env.DEFAULT-REPOSITORY }}.

I checked the sub-folder commands - they work

@varndellwagglebee
Copy link
Author

Still Error: error Command "build:prod" not found.

Run Borales/actions-yarn@v4.[2](https://github.com/Stillpoint-Software/wagglebee.ui/actions/runs/3651563665/jobs/6168916613#step:7:2).0
  with:
    cmd: build:prod
    dir: Stillpoint-Software/wagglebee.ui/packages/stillpoint-website
  env:
    AZURE_STATIC_WEB_APPS_API_TOKEN: ***
    APP_LOCATION: packages/stillpoint-website/
    APP_ARTIFACT_LOCATION: packages/stillpoint-website/build
    BRANCH_NAME: develop
    LPOINT: ***
    DEFAULT-REPOSITORY: Stillpoint-Software/wagglebee.ui/packages/stillpoint-website

@varndellwagglebee
Copy link
Author

varndellwagglebee commented Dec 8, 2022

the yml files are under a sub folder: stillpoint-software/wagglebee.ui/packages/stillpoing-website

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

2 participants