ngx-builders/netlify-builder

Won't build/deploy with dependencies. Error: "dependencies have not been built yet."

corysmc opened this issue ยท 3 comments

Describe the bug
When deploying a project via netlify-builder I can't deploy without first building dependencies. Adding the --with-deps flag doesn't make a difference.

To Reproduce
Steps to reproduce the behavior:

  1. Create a project that is deployed via @netlify-builder/deploy:deploy e.g. deploy target looks like this:
"deploy": {
          "builder": "@netlify-builder/deploy:deploy",
          "options": {
            "outputPath": "dist/apps/my-app/www"
          },
          "configurations": {
            "production": {
              "siteId": "your-side-id"
            }
          }
        }
  1. Create a ui library depency (do not build)
  2. try to deploy via your netlify builder
  3. See error Some of the project project-name dependencies have not been built yet. Please build these libraries before:
  4. Try to add the --with-deps flag before running e.g. nx deploy your-app
  5. Same error is thrown

Console:

$ nx deploy my-app --with-deps

> nx run my-app:deploy 
Executing netlify deploy command ...... 
๐Ÿ“ฆ Building "my-app". Configuration: "production". Build Command: build. 
Some of the project my-app's dependencies have not been built yet. Please build these libraries before:
- core

Try: nx run my-app:build --with-deps
โŒ Application build failed

โ€”โ€”โ€”โ€”โ€”โ€”โ€”โ€”โ€”โ€”โ€”โ€”โ€”โ€”โ€”โ€”โ€”โ€”โ€”โ€”โ€”โ€”โ€”โ€”โ€”โ€”โ€”โ€”โ€”โ€”โ€”โ€”โ€”โ€”โ€”โ€”โ€”โ€”โ€”โ€”โ€”โ€”โ€”โ€”โ€”โ€”โ€”

>  NX   ERROR  Running target "deploy" failed

  Failed projects:
  
  - my-app

Expected behavior
There needs to be a way to build with dependencies

Current Workaround

  1. First runnpm run nx affected -- --target=build --with-deps // this will build dependencies
  2. Then run npm run nx affected -- --target=deploy

Thanks for reporting this will check this @corysmc ๐Ÿ˜Š

@corysmc I am adding a new flag withDeps: boolean to support this,

@corysmc I am adding a new flag withDeps: boolean to support this,

Can you verify this with 4.0.0, you can set withDeps: true in your angular.json or try passing --with-deps