#An unhandled exception occurred Invalid target {projectDigitalEdgeClaimsweb-ui,targetbuild}

57 messages ยท Page 1 of 1 (latest)

graceful drum
#

I am trying to change the path of the website but getting this error.

#
// your code here
An unhandled exception occurred: Invalid target: {"project":"DigitalEdgeClaims/web-ui","target":"build"}.
See "C:\Users\siddh\AppData\Local\Temp\ng-c0DrCM\angular-errors.log" for further details.
#

this is the error log ```ts
// your code here
[error] Error: Invalid target: {"project":"DigitalEdgeClaims/web-ui","target":"build"}.
at C:\Users\siddh\Desktop\Cogitate\Axiom\Dev-check\dotClaimTRDRModz\web-ui\node_modules@angular-devkit\architect\src\architect.js:174:23
at processTicksAndRejections (node:internal/process/task_queues:96:5)

#

initially it was web-ui, I was told to change the path to DigitalEdgeClaims/web-ui

#

not able to figure out what should I do

mystic crescent
#

Also, what is causing that error? Running a certain CLI command? Or at run time ?

graceful drum
graceful drum
mystic crescent
graceful drum
#

basehref, browser target, devServerTarget

mystic crescent
#

paste your angular.json

#

The issue is it's trying to run the build target for the DigitalEdgeClaims/web-ui project

#

But it cant find it.

#

I assume you didnt change the project name.

#

But would be easier to tell if we can see the angular.json file.

graceful drum
mystic crescent
#

The key in the projects object

graceful drum
mystic crescent
#

line 6.

#

or you can keep it.

#

But then u need to fix the other side, and ensure it tries to build the web-ui project, and not the DigitalEdgeClaims/web-ui.

graceful drum
graceful drum
mystic crescent
#

Can you show your npm scripts ?

#

the scripts section in package.json

graceful drum
#
// your code here
"scripts": {
    "ng": "ng",
    "start": "node --max_old_space_size=8192 ./node_modules/@angular/cli/bin/ng serve",
    "build": "node --max_old_space_size=8192 node_modules/@angular/cli/bin/ng build --configuration=production",
    "build-prod": "ng build --configuration=production",
    "test": "ng test",
    "lint": "ng lint",
    "e2e": "ng e2e"
  }
mystic crescent
#

Is that the angular.json file before or after the changes ?

#

As it has not a single DigitalEdgeClaims in there

graceful drum
#

before

mystic crescent
#

Ah ...

#

Will need the one after, to understand what you changed.

#

but you shouldnt be touching the devTarget if u didnt change the project name.

graceful drum
#

all I did was replace web-ui with DigitalEdgeClaims/web-ui. That won't affect the scripts part

mystic crescent
#

"devServerTarget": "web-ui:serve"

#

web-ui here refers to LINE6 in angular.json

#

You need to ensure they are the same.

#

Same with here: "devServerTarget": "web-ui:serve:production"

#

I would keep that web-ui tho.

#

but if you change one, u have to change the other as well.

graceful drum
#

let me send the updated one

mystic crescent
#

Well if u change that, u need to change LINE6 as well

#

if u did, I wonder if there are issues with backslashes.

#

wouldnt use a backslash in the project name tho.

#

no real reason, feels off is all.

#

Unless it doesn;t work, which depends on what your angular.json looks like

graceful drum
#

this is the updated json file

mystic crescent
#

so try changing it to this:

graceful drum
#

I did this thing first. was getting the error I listed in the post from that only

mystic crescent
#

Not sure why you would need to change the project name if you are moving the baseHref tho.

graceful drum
mystic crescent
#

I mean, you can ofcourse. But its not needed to change the name of the project only to change the baseHref