Skip to content

Commit 4fc52cf

Browse files
fix(js): use absolute filetorun path (#30091)
Fix a bug introduced in #30087 #### Current Behavior The `@nx/js` plugins throw an error when the project is served in the project root but not in the workspace root. #### Expected Behavior Ensure that `nx run $project:serve` works correctly both in the workspace root and the project root, restoring the previous behavior. #### Related Issue(s) Fixes #30087
1 parent 2fc1945 commit 4fc52cf

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

packages/js/src/executors/node/node.impl.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -404,7 +404,7 @@ function getFileToRun(
404404
const outputFilePath = interpolate(outputPath, {
405405
projectName: project.name,
406406
projectRoot: project.data.root,
407-
workspaceRoot: '',
407+
workspaceRoot: context.root,
408408
});
409409
return path.join(outputFilePath, 'main.js');
410410
}

0 commit comments

Comments
 (0)