Won't build/deploy with dependencies. Error: "dependencies have not been built yet."
corysmc opened this issue ยท 3 comments
corysmc commented
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:
- 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"
}
}
}
- Create a ui library depency (do not build)
- try to deploy via your netlify builder
- See error
Some of the project project-name dependencies have not been built yet. Please build these libraries before:
- Try to add the
--with-deps
flag before running e.g.nx deploy your-app
- 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
- First run
npm run nx affected -- --target=build --with-deps
// this will build dependencies - Then run
npm run nx affected -- --target=deploy
santoshyadavdev commented
Thanks for reporting this will check this @corysmc ๐
santoshyadavdev commented
@corysmc I am adding a new flag withDeps: boolean to support this,
santoshyadavdev commented
@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