Support angular build outputPath as Object type #26746
Replies: 4 comments 1 reply
-
Nx expects The fix for Angular would be to replace For example, From:
To this:
Or whatever the actual output paths are. |
Beta Was this translation helpful? Give feedback.
-
Here is the definition from angular doc:
https://v17.angular.io/guide/workspace-config#output-path-configuration |
Beta Was this translation helpful? Give feedback.
-
Hello,any updates? |
Beta Was this translation helpful? Give feedback.
-
I faced same error, the daemon said "Failed to convert JavaScript value".
// apps/project1/project.json
"targets": {
"build": {
"outputs": ["{options.outputPath}"],
"options": {
"outputPath": "dist/apps/project1",
...
},
"configurations": {
"production": {
"outputPath": {
"base": "dist/project1",
"browser": ""
},
... |
Beta Was this translation helpful? Give feedback.
-
Current Behavior
As Angular already support to config "outputPath" as Object angular/angular-cli#26304 (comment)
but if config:
"outputPath": {
"base": "dist/apps/appname",
"browser": "web"
},
But when triggering nx build, the NX deamon crashes:
[NX Daemon Server] - 2024-06-28T07:50:37.520Z - Handled REQUEST_PROJECT_GRAPH. Handling time: 533. Response time: 2.
C:\git_source\fone-web-classic\node_modules.pnpm\nx@19.3.0\node_modules\nx\src\hasher\native-task-hasher-impl.js:32
const plans = this.planner.getPlansReference(tasks.map((t) => t.id), taskGraph);
^
Error: Failed to convert JavaScript value
Object {"base":"dist/planning","browser":"web"}
into rust typeString
at NativeTaskHasherImpl.hashTasks (C:\git_source\fone-web-classic\node_modules.pnpm\nx@19.3.0\node_modules\nx\src\hasher\native-task-hasher-impl.js:32:36)
at InProcessTaskHasher.hashTasks (C:\git_source\fone-web-classic\node_modules.pnpm\nx@19.3.0\node_modules\nx\src\hasher\task-hasher.js:53:50)
at handleHashTasks (C:\git_source\fone-web-classic\node_modules.pnpm\nx@19.3.0\node_modules\nx\src\daemon\server\handle-hash-tasks.js:30:56)
at process.processTicksAndRejections (node:internal/process/task_queues:95:5)
at async handleResult (C:\git_source\fone-web-classic\node_modules.pnpm\nx@19.3.0\node_modules\nx\src\daemon\server\server.js:130:16)
at async handleMessage (C:\git_source\fone-web-classic\node_modules.pnpm\nx@19.3.0\node_modules\nx\src\daemon\server\server.js:92:9)
at async C:\git_source\fone-web-classic\node_modules.pnpm\nx@19.3.0\node_modules\nx\src\daemon\server\server.js:55:9 {
code: 'StringExpected'
}
Node.js v20.11.1
Expected Behavior
The NX deamon should not crash.
GitHub Repo
No response
Steps to Reproduce
There is already a same issue #21480 , but it had been closed.
Beta Was this translation helpful? Give feedback.
All reactions