question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Cannot build Angular Application with buildable library dependecies and --baseHref (or many other commands)

See original GitHub issue

Current Behavior

After creating an Angular Application and some buildable libraries I cannot build using some available commands from the build UI in NX Console (or directly from cmd line). I am able to build --withDeps using no other flags but I must use some more. I tried building with aot, baseHref, and buildOptimizer and received the error “Unkown option” for each one.

Expected Behavior

I expected to be able to build --withDeps and use the flags required to build my Angular Applications. I have not had it work in the past, but that doesn’t mean I’m not doing anything wrong.

Steps to Reproduce

Generate workspace, add application, add buildable library, run nx run project:build --withDeps --baseHref=/Studio/.

I can reproduce this without any code changes in nx-examples. Pull down the repo, npm install, and run this command: ng build products --with-deps --baseHref=/Studio/

Failure Logs

> Executing task: ng build products --with-deps --baseHref=/Studio/ <

Unknown option: '--with-deps'

Environment

nx : Not Found @nrwl/angular : 10.3.1 @nrwl/cli : 10.3.1 @nrwl/cypress : 10.3.1 @nrwl/eslint-plugin-nx : Not Found @nrwl/express : Not Found @nrwl/jest : 10.3.1 @nrwl/linter : 10.3.1 @nrwl/nest : Not Found @nrwl/next : Not Found @nrwl/node : Not Found @nrwl/react : Not Found @nrwl/schematics : Not Found @nrwl/tao : Not Found @nrwl/web : Not Found @nrwl/workspace : 10.3.1 typescript : 4.0.5

Issue Analytics

  • State:closed
  • Created 3 years ago
  • Comments:5

github_iconTop GitHub Comments

1reaction
fmuscolinocommented, Mar 23, 2021

@vsavkin Any update on the PR?

We need to build a project --with-deps with the --base-href and it fails. The problem is that we can’t configure baseHref in angular.json since the baseHref is not fixed (depends on branch name and it’s specified in our CI environment)

1reaction
labeledcommented, Nov 25, 2020

Wait one, I realized that nx-examples doesn’t use buildable libraries. I’ll update soon. update I can’t push a branch right now but I’m hoping my description is good enough. 😃 Thanks!

Read more comments on GitHub >

github_iconTop Results From Across the Web

Nx - 'Unable to write a reference...' error when using run ...
I am using the run-commands builder as there are some other tasks that need to be invoked after the initial library build. I...
Read more >
Creating libraries - Angular
This page provides a conceptual overview of how to create and publish new libraries to extend Angular functionality. If you find that you...
Read more >
Deployment - Angular
A command line option used to specify the base path for resolving relative URLs for assets such as images, scripts, and style sheets...
Read more >
ng build - Angular
Option Description Value Type Default Value ‑‑aot Build using Ahead of Time compilation. boolean true ‑‑base‑href Base url for the application being built. string ‑‑delete‑output‑path Delete...
Read more >
Angular workspace configuration
json , a few properties configure the workspace and a projects section contains the remaining per-project configuration options. You can override Angular CLI ......
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found